/* Front-end stylesheet for Global Silver Ounce WordPress Widget  */

.silver-ounce-widget {
    direction: rtl;
    text-align: right;
    font-family: inherit, Tahoma, sans-serif;
    border-radius: 12px;
    padding: 18px;
    margin: 15px 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Themes */
.silver-ounce-widget.gsoc-dark {
    background: #1e293b;
    border: 1px solid #334155;
    color: #d1d4dc;
}

.silver-ounce-widget.gsoc-light {
    background: #ffffff;
    border: 1px solid #e0e3eb;
    color: #131722;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Header styling */
.gsoc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(128,128,128, 0.15);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.gsoc-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gsoc-icon {
    font-size: 20px;
}

.gsoc-widget-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 !important;
    padding: 0 !important;
}

.gsoc-dark .gsoc-widget-title {
    color: #ffffff;
}

.gsoc-light .gsoc-widget-title {
    color: #131722;
}

.gsoc-badge {
    font-family: monospace, sans-serif;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.gsoc-dark .gsoc-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #5d9cec;
}

.gsoc-light .gsoc-badge {
    background: rgba(0, 122, 186, 0.08);
    color: #007cba;
}

/* Calculator Grid */
.gsoc-calc-section {
    background: rgba(128, 128, 128, 0.04);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px dashed rgba(128,128,128, 0.15);
}

.gsoc-calc-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.gsoc-calc-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.gsoc-calc-label {
    font-size: 13px;
    font-weight: bold;
    color: inherit;
    opacity: 0.95;
    white-space: nowrap;
}

.gsoc-calc-value-container {
    display: flex;
    align-items: center;
    position: relative;
    width: 110px;
    flex-shrink: 0;
}
@media (min-width: 480px) {
    .gsoc-calc-value-container {
        width: 160px;
    }
}

.gsoc-input {
    width: 100%;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
    direction: ltr;
}

.gsoc-dark .gsoc-input {
    background: #0f172a;
    border: 1px solid #334155;
    color: #ffffff;
}

.gsoc-light .gsoc-input {
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #131722;
}

.gsoc-select {
    width: 110px;
    flex-shrink: 0;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    box-sizing: border-box;
}
@media (min-width: 480px) {
    .gsoc-select {
        width: 160px;
    }
}

.gsoc-dark .gsoc-select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #ffffff;
}

.gsoc-light .gsoc-select {
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #131722;
}

.gsoc-calc-value-container .gsoc-calc-unit {
    position: absolute;
    right: 8px;
    font-size: 11px;
    opacity: 0.6;
}

.gsoc-calc-price-result .gsoc-calc-unit {
    font-size: 11px;
    font-weight: bold;
    opacity: 0.95;
    color: #28a745;
}

.gsoc-dark .gsoc-input {
    padding-right: 48px; /* space for 'تومان' */
}
.gsoc-light .gsoc-input {
    padding-right: 48px;
}

/* Result highlight */
.gsoc-calc-card.highlight {
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.25);
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.gsoc-calc-price-result {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gsoc-highlight-price {
    font-size: 18px;
    font-weight: 800;
    color: #28a745;
    font-family: inherit;
}

.gsoc-calc-footer {
    font-size: 10px;
    text-align: center;
    opacity: 0.55;
    margin-top: 6px;
}

/* Ticker container */
.gsoc-ticker-container {
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
}

/* Chart */
.gsoc-chart-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Footer credits */
.gsoc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    opacity: 0.55;
    margin-top: 12px;
}

.gsoc-credits {
    cursor: pointer;
    font-weight: 500;
}
.gsoc-credits:hover {
    opacity: 0.85;
}

/* Responsiveness adjustments */
@media (max-width: 600px) {
    .gsoc-calc-grid {
        grid-template-columns: 1fr;
    }
    .gsoc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .gsoc-badge {
        align-self: flex-end;
    }
}
