/* Base Styles */
.profit-calculator {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    color: #333;
}

.calculator-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.calculator-body {
    padding: 22px 24px;
}

/* Two-column layout styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 5px;
}

.form-column {
    flex: 1;
    min-width: 0;
}

/* Legacy styles for backward compatibility */
.calculator-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.calculator-field {
    flex: 1;
    min-width: 0;
}

.calculator-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

/* Form Group Styles - Keeping for compatibility */
.form-group {
    margin-bottom: 22px;
    padding: 0 2px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin: 4px 0 6px;
    box-sizing: border-box;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.1);
    background-color: #fff;
}

.form-control::placeholder {
    color: #999;
}

.calculate-button {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, #3a7bd5 0%, #2c6bc7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transform: translateY(0);
    transition: all 0.2s ease;
}

.calculate-button:hover {
    background: #2c6bc7;
    transform: translateY(-1px);
}

.calculator-header {
    background: linear-gradient(135deg, #2a3042 0%, #3a4356 100%);
    color: #fff;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculator-header p {
    margin: 5px 0 0;
    opacity: 0.8;
    font-size: 0.85rem;
}

.calculator-results {
    margin-top: 25px;
    padding: 22px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.calculator-results:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.result-box {
    padding: 20px;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.result-box:hover {
    background: #f0f5ff;
    border-color: #d0e0ff;
}

.result-title {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #333;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.result-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #666;
}

/* Animation for results */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c6bc7;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 0;
}

#pc-profit-money {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 5px;
}

#pc-profit-currency {
    font-size: 1.2rem;
    opacity: 0.9;
}

#pc-profit-pips {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 5px;
}

#pc-profit-currency {
    color: #3a7bd5;
    font-weight: 500;
    margin-right: 2px;
    padding-left: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .calculator-row,
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .calculator-field,
    .form-column {
        width: 100%;
    }
    
    .result-box {
        margin-bottom: 15px;
    }
}

/* Loading State Styles */
.calculator-container.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.calculator-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(58, 123, 213, 0.2);
    border-top-color: #3a7bd5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}