/**
 * Apex27 Rental Yield Calculator Styles
 * Clean, minimal design matching stamp duty calculator
 */

/* Base Container */
.apex27-rental-yield-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 30px;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Header */
.apex27-ryc__header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.apex27-ryc__title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.apex27-ryc__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Form Elements */
.apex27-ryc__form {
    margin-bottom: 20px;
}

.apex27-ryc__field {
    margin-bottom: 24px;
}

.apex27-ryc__label {
    display: block;
    margin-bottom: 8px;
}

.apex27-ryc__label-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.apex27-ryc__label-help {
    font-size: 12px;
    color: #9ca3af;
}

/* Section Titles */
.apex27-ryc__section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 32px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.apex27-ryc__expenses {
    margin-top: 32px;
}

/* Input Group */
.apex27-ryc__input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* Split Input Group */
.apex27-ryc__input-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.apex27-ryc__input-split-item {
    width: 100%;
}

.apex27-ryc__currency {
    position: absolute;
    left: 16px;
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.apex27-ryc__input {
    width: 100%;
    padding: 12px 16px 12px 36px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
}

.apex27-ryc__input-split .apex27-ryc__input {
    padding-left: 16px;
    width: 100%;
}

.apex27-ryc__input:focus {
    outline: none;
    border-color: var(--primary, #6b7280);
    box-shadow: none;
}

.apex27-ryc__input::placeholder {
    color: #9ca3af;
}

/* Select */
.apex27-ryc__select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    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='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.apex27-ryc__select:focus {
    outline: none;
    border-color: var(--primary, #6b7280);
    box-shadow: none;
}

/* Buttons */
.apex27-ryc__actions {
    margin-top: 24px;
}

.apex27-ryc__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.apex27-ryc__button--calculate {
    width: 100%;
    background: var(--primary, #6b7280);
    color: white;
}

.apex27-ryc__button--calculate:hover:not(:disabled) {
    background: var(--primary, #4b5563);
    opacity: 0.9;
}

.apex27-ryc__button--calculate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apex27-ryc__button--print,
.apex27-ryc__button--reset {
    background: #f3f4f6;
    color: #374151;
    margin-right: 12px;
}

.apex27-ryc__button--print:hover,
.apex27-ryc__button--reset:hover {
    background: #e5e7eb;
}

/* Results Section */
.apex27-ryc__results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

/* Result Grid */
.apex27-ryc__result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Result Cards */
.apex27-ryc__result-card {
    padding: 20px;
    background: #f9fafb;
    border-radius: 0;
    text-align: center;
    border: 1px solid #e5e7eb;
    position: relative;
}

.apex27-ryc__result-card--primary {
    background: var(--primary, #6b7280);
    color: white;
    border: none;
}

.apex27-ryc__result-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.apex27-ryc__result-amount {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}

.apex27-ryc__result-desc {
    font-size: 12px;
    opacity: 0.8;
}

/* Yield Indicator */
.apex27-ryc__yield-indicator {
    margin-top: 12px;
}

.apex27-ryc__yield-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.apex27-ryc__yield-badge.strong {
    background: #10b981;
    color: white;
}

.apex27-ryc__yield-badge.good {
    background: #f59e0b;
    color: white;
}

.apex27-ryc__yield-badge.low {
    background: #ef4444;
    color: white;
}

/* Financial Summary */
.apex27-ryc__summary {
    background: #f9fafb;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    margin-bottom: 24px;
}

.apex27-ryc__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.apex27-ryc__summary-row:last-child {
    border-bottom: none;
}

.apex27-ryc__summary-row--total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #d1d5db;
    font-weight: 600;
}

.apex27-ryc__summary-label {
    font-size: 14px;
    color: #6b7280;
}

.apex27-ryc__summary-row--total .apex27-ryc__summary-label {
    color: #111827;
    font-weight: 600;
}

.apex27-ryc__summary-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.apex27-ryc__summary-value--expense {
    color: #dc2626;
}

/* Breakdown Table */
.apex27-ryc__breakdown {
    margin-top: 24px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.apex27-ryc__breakdown-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #111827;
}

.apex27-ryc__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.apex27-ryc__table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.apex27-ryc__table td {
    padding: 12px;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.apex27-ryc__table tr:last-child td {
    border-bottom: none;
}

.apex27-ryc__table .income {
    color: #10b981;
}

.apex27-ryc__table .expense {
    color: #dc2626;
}

/* Interpretation */
.apex27-ryc__interpretation {
    margin-top: 20px;
    padding: 16px;
    background: #fef3c7;
    border-radius: 0;
    border-left: 4px solid #f59e0b;
}

.apex27-ryc__interpretation-text {
    margin: 0;
    color: #92400e;
    font-size: 14px;
    line-height: 1.6;
}

/* Result Actions */
.apex27-ryc__result-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Loading State */
.apex27-ryc__loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.apex27-ryc__spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary, #6b7280);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Error State */
.apex27-ryc__error {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0;
    color: #dc2626;
    margin-top: 20px;
}

.apex27-ryc__error-message {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 640px) {
    .apex27-rental-yield-calculator {
        padding: 20px;
        margin: 10px;
    }

    .apex27-ryc__result-grid {
        grid-template-columns: 1fr;
    }

    .apex27-ryc__result-amount {
        font-size: 24px;
    }

    .apex27-ryc__table {
        font-size: 12px;
    }

    .apex27-ryc__result-actions {
        flex-direction: column;
    }

    .apex27-ryc__button {
        width: 100%;
    }

    .apex27-ryc__input-split {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .apex27-ryc__select {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .apex27-ryc__actions,
    .apex27-ryc__result-actions,
    .apex27-ryc__form {
        display: none !important;
    }

    .apex27-rental-yield-calculator {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}