/* ========================================
   Property Card Calculator Integration
   Option C: Calculator directly in cards
   ======================================== */

/* Currency Converter in Property Cards */
.property-currency-converter {
    margin: 1rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.property-currency-converter label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-currency-converter label i {
    color: #d4af37;
    margin-right: 0.4rem;
}

.property-currency-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0d1b2a;
    background: white;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.property-currency-select:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.property-currency-select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Calculate ROI Button */
.btn-calculate-roi {
    width: 100%;
    padding: 0.85rem 1.2rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #d4af37 0%, #c49b2d 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-calculate-roi i {
    font-size: 1rem;
}

.btn-calculate-roi:hover {
    background: linear-gradient(135deg, #c49b2d 0%, #b38b1f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-calculate-roi:active {
    transform: translateY(0);
}

/* ROI Modal - Enhanced for Card Integration */
.roi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.roi-modal.active {
    display: flex;
}

.roi-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpFadeIn 0.4s ease;
}

.roi-modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0d1b2a 0%, #1e3a5f 100%);
    border-radius: 16px 16px 0 0;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roi-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.roi-modal-header h3 i {
    color: #d4af37;
    margin-right: 0.5rem;
}

.roi-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.roi-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.roi-modal-body {
    padding: 2rem;
}

.roi-property-info {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #d4af37;
}

.roi-property-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #0d1b2a;
}

.roi-property-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #495057;
}

.roi-property-info strong {
    color: #d4af37;
    font-weight: 700;
}

.roi-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.roi-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.roi-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.roi-form-group input {
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.roi-form-group input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.roi-calculate-btn {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #d4af37 0%, #c49b2d 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.roi-calculate-btn:hover {
    background: linear-gradient(135deg, #c49b2d 0%, #b38b1f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.roi-results {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.roi-results.show {
    display: block;
    animation: slideUpFadeIn 0.4s ease;
}

.roi-results h4 {
    margin: 0 0 1rem 0;
    color: #1e7e34;
    font-size: 1.2rem;
}

.roi-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.roi-result-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.roi-result-item label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.roi-result-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .roi-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .roi-modal-header {
        padding: 1.25rem 1.5rem;
        border-radius: 12px 12px 0 0;
    }

    .roi-modal-header h3 {
        font-size: 1.2rem;
    }

    .roi-modal-body {
        padding: 1.5rem;
    }

    .roi-results-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .property-currency-converter {
        padding: 0.65rem;
    }

    .property-currency-converter label {
        font-size: 0.8rem;
    }

    .property-currency-select {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }

    .btn-calculate-roi {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .roi-modal-header h3 {
        font-size: 1.1rem;
    }

    .roi-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }

    .roi-property-info h4 {
        font-size: 1rem;
    }

    .roi-result-item .value {
        font-size: 1.1rem;
    }
    
    .roi-form-row {
        grid-template-columns: 1fr;
    }
}

/* Enhanced ROI Calculator Styles */
.roi-currency-selector {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border-radius: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.roi-currency-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.roi-currency-selector label i {
    color: #d4af37;
    margin-right: 0.4rem;
}

.roi-currency-dropdown {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0d1b2a;
    background: white;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.roi-currency-dropdown:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.roi-currency-dropdown:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.roi-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.roi-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.roi-form-group label i {
    color: #d4af37;
    margin-right: 0.4rem;
}

.input-with-currency,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #d4af37;
    pointer-events: none;
    z-index: 1;
}

.input-with-currency input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 55px;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.input-with-suffix input {
    width: 100%;
    padding: 0.75rem 70px 0.75rem 0.75rem;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.input-suffix {
    position: absolute;
    right: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    pointer-events: none;
}

.field-help {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.35rem;
    font-style: italic;
}

.roi-result-item.highlight {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border-left: 3px solid #d4af37;
}

.roi-result-item.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 3px solid #27ae60;
}

.roi-result-item.success .value {
    color: #27ae60;
}

.roi-result-item.highlight .value {
    color: #d4af37;
}

.result-help {
    display: block;
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.35rem;
    font-style: italic;
}

.roi-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.roi-summary p {
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
}

.roi-summary i {
    color: #3498db;
    margin-right: 0.4rem;
}

@media (max-width: 768px) {
    .roi-form-row {
        grid-template-columns: 1fr;
    }
    
    .roi-results-grid {
        grid-template-columns: 1fr;
    }
}
