/**
 * Real Estate Title Cost Calculator Styles
 * Professional, modern design with clean layout
 */

/* Reset and Base Styles */
.retcc-calculator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    color: #1e293b;
    line-height: 1.6;
}

.retcc-calculator-wrapper * {
    box-sizing: border-box;
}

/* Calculator Container */
.retcc-calculator-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 40px;
    margin-bottom: 30px;
}

/* Form Styles */
.retcc-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.retcc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.retcc-label {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.retcc-select,
.retcc-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: inherit;
}

.retcc-select:focus,
.retcc-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.retcc-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.retcc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.retcc-currency-symbol {
    position: absolute;
    left: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    pointer-events: none;
}

.retcc-input-wrapper .retcc-input {
    padding-left: 35px;
}

.retcc-help-text {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Button Styles */
.retcc-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.retcc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.retcc-button:active {
    transform: translateY(0);
}

.retcc-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.retcc-button-secondary {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #2563eb;
    background: #ffffff;
    border: 2px solid #2563eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retcc-button-secondary:hover {
    background: #eff6ff;
}

/* Loading Spinner */
.retcc-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: retcc-spin 0.6s linear infinite;
}

@keyframes retcc-spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.retcc-error {
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-top: 20px;
}

/* Results Container */
.retcc-results-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 40px;
    animation: retcc-slide-in 0.4s ease;
}

@keyframes retcc-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.retcc-results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.retcc-results-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.retcc-results-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Results Table */
.retcc-results-content {
    overflow-x: auto;
}

.retcc-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.retcc-results-table thead th {
    background: #f8fafc;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.retcc-results-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.retcc-results-table tbody tr:hover {
    background: #f8fafc;
}

.retcc-results-table tbody td {
    padding: 14px 16px;
    color: #334155;
}

.retcc-amount-col {
    text-align: right;
    font-weight: 500;
}

.retcc-total-row {
    background: #f0f9ff !important;
    border-top: 2px solid #2563eb !important;
}

.retcc-total-row td {
    padding: 18px 16px !important;
    font-size: 18px;
    color: #1e40af;
}

/* Results Footer */
.retcc-results-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 640px) {
    .retcc-calculator-wrapper {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .retcc-calculator-container,
    .retcc-results-container {
        padding: 25px 20px;
    }
    
    .retcc-title {
        font-size: 26px;
    }
    
    .retcc-subtitle {
        font-size: 14px;
    }
    
    .retcc-results-table {
        font-size: 14px;
    }
    
    .retcc-results-table thead th,
    .retcc-results-table tbody td {
        padding: 12px 10px;
    }
    
    .retcc-total-row td {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .retcc-calculator-container,
    .retcc-button-secondary {
        display: none;
    }
    
    .retcc-results-container {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
