/* Main container */
.aum-aurum-calculator-wrap { 
    border: 1px solid #e0e0e0; 
    padding: 24px; 
    max-width: 1200px; 
    margin: 0 auto;
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: #fff; 
    border-radius: 0px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Controls section */
.aau-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.aau-currency-display {
    font-size: 16px;
    color: #2e3b70;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 0px;
    border-left: 4px solid #2e3b70;
}

.aau-rate-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 0px;
    border: 1px solid #e9ecef;
}

.aau-rate-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.aau-rate-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.aau-rate-label {
    font-weight: 600;
    color: #495057;
}

.aau-rate-value {
    color: #2e3b70;
    font-weight: 500;
}

.aau-refresh-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: #2e3b70;
    border: none;
    transition: background 0.3s;
}

.aau-refresh-btn:hover {
    background: #1e2a5a;
}

.aau-unit-label {
    display: block;
    margin-top: 10px;
}

.aau-unit-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 0px;
    font-size: 16px;
    margin-top: 5px;
}

.aau-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 30px 0;
}

/* Products table */
.aau-products-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 0px;
    border: 1px solid #e0e0e0;
}

.aau-products {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.aau-products th {
    background: #2e3b70;
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
}

.aau-products td {
    border: 1px solid #e7e7e7;
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
    background: white;
}

.aau-products tr:nth-child(even) td {
    background: #fafafa;
}

.aau-products input[type="number"], 
.aau-products select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 0px;
    font-size: 15px;
    box-sizing: border-box;
}

.aau-products select {
    background: white;
    cursor: pointer;
}

.aau-products input[type="number"]:focus,
.aau-products select:focus {
    border-color: #2e3b70;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 59, 112, 0.1);
}

/* Remove spinner arrows */
.aau-products input[type=number]::-webkit-outer-spin-button,
.aau-products input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.aau-products input[type=number] {
    -moz-appearance: textfield;
}

/* Row components */
.aau-amount-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aau-unit-display {
    font-weight: 600;
    color: #2e3b70;
    min-width: 30px;
}

.aau-fineness-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aau-fineness-display {
    font-weight: 600;
    color: #2e3b70;
    padding: 6px 12px;
    background: #f0f4ff;
    border-radius: 0px;
}

.aau-remove-btn {
    background: #dc3545;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 0px;
    transition: background 0.3s;
}

.aau-remove-btn:hover {
    background: #c82333;
}

.aau-add-btn {
    background: #28a745;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s;
}

.aau-add-btn:hover {
    background: #218838;
}

/* Totals container */
.aau-totals-container {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border: 2px solid #2e3b70;
    padding: 24px;
    margin: 24px 0;
    border-radius: 0px;
    text-align: center;
}

.aau-payout-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.aau-payout-header {
    font-size: 18px;
    color: #495057;
    font-weight: 600;
}

.aau-payout-value {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 28px;
    color: #2e3b70;
    font-weight: 700;
}

.aau-best-value-label {
    background: #4CAF50;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Contact section */
.aau-contact-header {
    color: #2e3b70;
    margin-bottom: 24px;
    font-size: 22px;
    text-align: center;
}

.aau-contact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aau-contact-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.aau-contact-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.aau-contact-input,
.aau-contact-textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 0px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.aau-contact-input:focus,
.aau-contact-textarea:focus {
    border-color: #2e3b70;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 59, 112, 0.1);
}

.aau-contact-textarea {
    height: 120px;
    resize: vertical;
}

/* Submit section */
.aau-submit-container {
    text-align: center;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
}

.aau-submit-btn {
    background: #2e3b70 !important;
    border: none !important;
    color: white !important;
    padding: 18px 48px !important;
    border-radius: 0px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(46, 59, 112, 0.2) !important;
}

.aau-submit-btn:hover {
    background: #1e2a5a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(46, 59, 112, 0.3) !important;
}

.aau-submit-btn:active {
    transform: translateY(0) !important;
}

.aau-submit-message {
    display: block;
    margin-top: 16px;
    font-size: 16px;
    min-height: 24px;
}

/* Loading indicator */
.aau-loading {
    color: #666;
    font-style: italic;
}

.aau-rate-loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .aum-aurum-calculator-wrap {
        padding: 20px;
        margin: 0 10px;
    }
    
    .aau-payout-value {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .aum-aurum-calculator-wrap {
        padding: 16px;
        border-radius: 0px;
    }
    
    .aau-controls {
        gap: 16px;
    }
    
    .aau-products th,
    .aau-products td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .aau-products th {
        font-size: 14px;
    }
    
    .aau-payout-value {
        font-size: 24px;
    }
    
    .aau-contact-row {
        grid-template-columns: 1fr;
    }
    
    .aau-submit-btn {
        padding: 16px 32px !important;
        font-size: 16px !important;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .aum-aurum-calculator-wrap {
        padding: 12px;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .aau-rate-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .aau-products {
        min-width: 400px;
    }
    
    .aau-products th,
    .aau-products td {
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .aau-products input[type="number"],
    .aau-products select {
        padding: 8px;
        font-size: 14px;
    }
    
    .aau-fineness-wrapper {
        flex-wrap: wrap;
    }
    
    .aau-totals-container {
        padding: 20px 16px;
    }
    
    .aau-payout-header {
        font-size: 16px;
    }
    
    .aau-payout-value {
        font-size: 20px;
        flex-direction: column;
    }
    
    .aau-best-value-label {
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .aau-contact-header {
        font-size: 18px;
    }
    
    .aau-contact-input,
    .aau-contact-textarea {
        padding: 12px;
        font-size: 15px;
    }
}

/* Print styles */
@media print {
    .aau-refresh-btn,
    .aau-remove-btn,
    .aau-add-btn,
    .aau-submit-btn {
        display: none !important;
    }
    
    .aum-aurum-calculator-wrap {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .aau-best-value-label {
        background: #4CAF50 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}