/**
 * iWt Gold and Silver Quotation - Stylesheet
 * (C) 2026 iWt. All rights reserved.
 */

:root {
    --iwtgold-gold-start: #DAA520;
    --iwtgold-gold-end: #B8860B;
    --iwtgold-gold-light: #FFF8DC;
    --iwtgold-silver-start: #C0C0C0;
    --iwtgold-silver-end: #A9A9A9;
    --iwtgold-silver-light: #F5F5F5;
    --iwtgold-primary: #2c3e50;
    --iwtgold-success: #27ae60;
    --iwtgold-whatsapp: #25D366;
    --iwtgold-email: #3498db;
    --iwtgold-radius: 8px;
    --iwtgold-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --iwtgold-transition: all 0.3s ease;
}

/* Wrapper */
.iwtgold-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Error */
.iwtgold-error {
    background: #ffeef0;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: var(--iwtgold-radius);
    margin-bottom: 20px;
    border-left: 4px solid #c0392b;
}

/* Section */
.iwtgold-section {
    margin-bottom: 24px;
}

.iwtgold-section-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--iwtgold-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

/* Cards Row */
.iwtgold-cards-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Card */
.iwtgold-card {
    flex: 1 1 280px;
    max-width: 320px;
    min-width: 260px;
    border-radius: var(--iwtgold-radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--iwtgold-shadow);
    transition: var(--iwtgold-transition);
    position: relative;
    overflow: hidden;
}

.iwtgold-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.iwtgold-card-gold {
    background: linear-gradient(135deg, var(--iwtgold-gold-light) 0%, #fff 50%, var(--iwtgold-gold-light) 100%);
    border: 2px solid var(--iwtgold-gold-start);
}

.iwtgold-card-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--iwtgold-gold-start), var(--iwtgold-gold-end), var(--iwtgold-gold-start));
}

.iwtgold-card-silver {
    background: linear-gradient(135deg, var(--iwtgold-silver-light) 0%, #fff 50%, var(--iwtgold-silver-light) 100%);
    border: 2px solid var(--iwtgold-silver-start);
}

.iwtgold-card-silver::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--iwtgold-silver-start), var(--iwtgold-silver-end), var(--iwtgold-silver-start));
}

.iwtgold-card-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.iwtgold-card-price {
    font-size: 2em;
    font-weight: 800;
    color: #111;
    margin-bottom: 4px;
    line-height: 1.2;
}

.iwtgold-card-gold .iwtgold-card-price {
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.iwtgold-card-silver .iwtgold-card-price {
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.iwtgold-card-unit {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 12px;
}

.iwtgold-card-label {
    font-size: 1.05em;
    font-weight: 700;
    color: #333;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Update time */
.iwtgold-update-time {
    text-align: center;
    font-size: 0.8em;
    color: #999;
    margin-top: 8px;
    margin-bottom: 24px;
}

/* Calculator */
.iwtgold-calculator {
    background: #fff;
    border-radius: var(--iwtgold-radius);
    padding: 24px;
    box-shadow: var(--iwtgold-shadow);
    margin-bottom: 24px;
}

.iwtgold-calc-form {
    margin-bottom: 16px;
}

.iwtgold-calc-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.iwtgold-calc-field {
    flex: 1 1 180px;
}

.iwtgold-calc-field label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.iwtgold-select,
.iwtgold-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: var(--iwtgold-transition);
    background: #fff;
    box-sizing: border-box;
}

.iwtgold-select:focus,
.iwtgold-input:focus {
    border-color: var(--iwtgold-gold-start);
    outline: none;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
}

.iwtgold-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.iwtgold-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--iwtgold-transition);
    text-decoration: none;
    line-height: 1.4;
}

.iwtgold-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.iwtgold-calc-btn-wrap {
    flex: 0 0 auto;
}

.iwtgold-btn-primary {
    background: linear-gradient(135deg, var(--iwtgold-gold-start), var(--iwtgold-gold-end));
    color: #fff;
}

.iwtgold-btn-primary:hover {
    background: linear-gradient(135deg, var(--iwtgold-gold-end), var(--iwtgold-gold-start));
}

.iwtgold-btn-lock {
    background: var(--iwtgold-primary);
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

.iwtgold-btn-whatsapp {
    background: var(--iwtgold-whatsapp);
    color: #fff;
}

.iwtgold-btn-email {
    background: var(--iwtgold-email);
    color: #fff;
}

.iwtgold-btn-print {
    background: #7f8c8d;
    color: #fff;
}

/* Result */
.iwtgold-result {
    border-top: 2px solid #eee;
    padding-top: 20px;
    margin-top: 16px;
}

.iwtgold-result-inner {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--iwtgold-gold-light), #fff);
    border-radius: var(--iwtgold-radius);
    border: 2px solid var(--iwtgold-gold-start);
    margin-bottom: 16px;
}

.iwtgold-result-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.iwtgold-result-value {
    font-size: 2.4em;
    font-weight: 800;
    color: var(--iwtgold-primary);
    margin-bottom: 4px;
}

.iwtgold-result-detail {
    font-size: 0.85em;
    color: #888;
}

/* Animate result */
.iwtgold-result-value.iwtgold-animate {
    animation: iwtgoldPulse 0.5s ease;
}

@keyframes iwtgoldPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Lock Section */
.iwtgold-lock-section {
    margin-top: 16px;
}

.iwtgold-lock-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

.iwtgold-lock-badge {
    width: 100%;
    text-align: center;
    background: var(--iwtgold-success);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Modal */
.iwtgold-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iwtgold-modal-content {
    background: #fff;
    border-radius: var(--iwtgold-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.iwtgold-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.iwtgold-modal-header h4 {
    margin: 0;
    font-size: 1.2em;
}

.iwtgold-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
    line-height: 1;
}

.iwtgold-modal-close:hover {
    color: #333;
}

.iwtgold-modal-body {
    padding: 20px;
}

.iwtgold-form-group {
    margin-bottom: 16px;
}

.iwtgold-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.iwtgold-email-status {
    padding: 12px 20px;
    font-weight: 600;
    text-align: center;
}

.iwtgold-email-status.success {
    color: var(--iwtgold-success);
}

.iwtgold-email-status.error {
    color: #c0392b;
}

/* =============================================
   Print / PDF Report
   ============================================= */

/* Hidden on screen */
.iwtgold-print-area {
    display: none;
}

@media print {
    /* Hide everything on the page */
    body * {
        visibility: hidden;
    }

    /* Show only the print area */
    .iwtgold-print-area,
    .iwtgold-print-area * {
        visibility: visible;
    }

    .iwtgold-print-area {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        z-index: 99999;
    }

    /* Page container */
    .iwtgold-print-page {
        max-width: 700px;
        margin: 0 auto;
        padding: 40px 48px;
        font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        color: #1a1a1a;
        line-height: 1.5;
    }

    /* Top accent bar */
    .iwtgold-print-accent {
        height: 5px;
        border-radius: 3px;
        margin-bottom: 32px;
    }
    .iwtgold-print--gold .iwtgold-print-accent {
        background: linear-gradient(90deg, #B8860B, #DAA520, #FFD700, #DAA520, #B8860B);
    }
    .iwtgold-print--silver .iwtgold-print-accent {
        background: linear-gradient(90deg, #808080, #A9A9A9, #C0C0C0, #A9A9A9, #808080);
    }

    /* Header */
    .iwtgold-print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .iwtgold-print-logo {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .iwtgold-print-logo-icon {
        font-size: 36px;
        line-height: 1;
    }
    .iwtgold-print--gold .iwtgold-print-logo-icon {
        color: #B8860B;
    }
    .iwtgold-print--silver .iwtgold-print-logo-icon {
        color: #808080;
    }

    .iwtgold-print-brand {
        font-size: 20px;
        font-weight: 800;
        letter-spacing: 0.5px;
        color: #1a1a1a;
    }

    .iwtgold-print-subtitle {
        font-size: 11px;
        color: #777;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-top: 2px;
    }

    .iwtgold-print-meta {
        text-align: right;
    }

    .iwtgold-print-ref {
        font-size: 12px;
        font-weight: 700;
        color: #555;
        font-family: "Consolas", "Monaco", monospace;
        letter-spacing: 0.5px;
    }

    .iwtgold-print-date {
        font-size: 13px;
        color: #777;
        margin-top: 3px;
    }

    /* Divider */
    .iwtgold-print-divider {
        height: 1px;
        background: #d0d0d0;
        margin: 20px 0;
    }

    /* Title */
    .iwtgold-print-title {
        font-size: 22px;
        font-weight: 700;
        text-align: center;
        margin: 28px 0 24px;
        color: #2c3e50;
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }

    /* Detail table */
    .iwtgold-print-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin: 0 0 28px;
        border: 1px solid #ccc;
        border-radius: 6px;
        overflow: hidden;
    }

    .iwtgold-print-table th,
    .iwtgold-print-table td {
        padding: 14px 20px;
        text-align: left;
        font-size: 14px;
        border-bottom: 1px solid #e5e5e5;
    }

    .iwtgold-print-table tr:last-child th,
    .iwtgold-print-table tr:last-child td {
        border-bottom: none;
    }

    .iwtgold-print-table th {
        width: 40%;
        font-weight: 600;
        color: #555;
        background: #fafafa;
        border-right: 1px solid #e5e5e5;
    }

    .iwtgold-print-table td {
        font-weight: 700;
        color: #1a1a1a;
        background: #fff;
    }

    /* Total box */
    .iwtgold-print-total-box {
        text-align: center;
        padding: 24px 20px;
        border-radius: 8px;
        margin-bottom: 28px;
    }
    .iwtgold-print-total-box.iwtgold-print--gold {
        background: #fffbf0;
        border: 2px solid #DAA520;
    }
    .iwtgold-print-total-box.iwtgold-print--silver {
        background: #f8f8f8;
        border: 2px solid #A9A9A9;
    }

    .iwtgold-print-total-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 2.5px;
        color: #777;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .iwtgold-print-total-value {
        font-size: 36px;
        font-weight: 800;
        color: #1a1a1a;
        letter-spacing: 0.5px;
    }
    .iwtgold-print--gold .iwtgold-print-total-value {
        color: #8B6914;
    }
    .iwtgold-print--silver .iwtgold-print-total-value {
        color: #555;
    }

    /* Legal notice */
    .iwtgold-print-notice {
        font-size: 11px;
        color: #888;
        line-height: 1.6;
        padding: 14px 18px;
        background: #f9f9f9;
        border-left: 3px solid #ddd;
        border-radius: 0 4px 4px 0;
        margin-bottom: 24px;
    }
    .iwtgold-print-notice strong {
        color: #555;
    }

    /* Footer */
    .iwtgold-print-footer {
        text-align: center;
        padding-top: 16px;
    }

    .iwtgold-print-footer-brand {
        font-size: 12px;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 4px;
    }

    .iwtgold-print-footer-info {
        font-size: 10px;
        color: #bbb;
    }
}

/* Text mode (inline shortcode) */
.iwtgold-text {
    display: inline;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.iwtgold-text-label {
    font-weight: 600;
}

.iwtgold-text-price {
    font-weight: 800;
}

.iwtgold-text-gold .iwtgold-text-price {
    color: var(--iwtgold-gold-end);
}

.iwtgold-text-silver .iwtgold-text-price {
    color: #707070;
}

.iwtgold-text-unit {
    font-size: 0.85em;
    color: #888;
}

.iwtgold-text-sep {
    color: #ccc;
    margin: 0 2px;
}

.iwtgold-text-list {
    display: inline;
    line-height: 1.8;
}

.iwtgold-text-error {
    color: #c0392b;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .iwtgold-cards-row {
        flex-direction: column;
        align-items: center;
    }

    .iwtgold-card {
        max-width: 100%;
        min-width: unset;
        width: 100%;
    }

    .iwtgold-calc-row {
        flex-direction: column;
    }

    .iwtgold-calc-field {
        flex: 1 1 100%;
    }

    .iwtgold-result-value {
        font-size: 1.8em;
    }

    .iwtgold-lock-actions {
        flex-direction: column;
    }

    .iwtgold-lock-actions .iwtgold-btn {
        width: 100%;
    }
}
