/**
 * Modern Calculator Base Styles
 */

:root {
    /* Animation variables */
    --anim-duration: 0.6s;
    --anim-timing: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout variables */
    --card-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Main layout */
.calculator-main.full-width {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.calculator-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    margin-bottom: 60px;
}

/* Calculator container */
.calculator-container {
    background-color: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.calculator-header {
    background: linear-gradient(135deg, #ad865d 0%, #d5b586 100%);
    color: white;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.calculator-header h2, .calculator-header h3 {
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Decorative elements */
.calculator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(20deg);
    z-index: 1;
}

.calculator-body {
    padding: 25px;
    position: relative;
}

/* Form elements */
.form-row {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

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

.input-group-prepend {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 8px 12px;
    color: #555;
    font-weight: 500;
}

.input-group input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #ad865d;
    box-shadow: 0 0 0 3px rgba(173, 134, 93, 0.2);
}

/* Input types */
input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
    outline: none;
    border-color: #ad865d;
    box-shadow: 0 0 0 3px rgba(173, 134, 93, 0.2);
}

/* Radio and checkbox groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input, .checkbox-option input {
    margin-right: 8px;
    cursor: pointer;
}

/* Buttons */
.calculator-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #ad865d;
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #97744e;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: #ad865d;
    border: 2px solid #ad865d;
}

.btn-outline:hover {
    background-color: rgba(173, 134, 93, 0.1);
}

/* Section styling */
.calculator-section {
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-radius: var(--card-radius);
    overflow: hidden;
}

.calculator-section-header {
    background-color: #f8f8f8;
    padding: 12px 20px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculator-section-content {
    padding: 20px;
    background-color: #fff;
}

.toggle-icon {
    color: #ad865d;
    font-size: 18px;
    transition: transform 0.3s;
}

/* Results styling */
.calculator-results {
    background-color: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    height: 100%;
}

.calculator-results-header {
    background: linear-gradient(135deg, #ad865d 0%, #d5b586 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.calculator-results-header h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.calculator-results-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(20deg);
    z-index: 1;
}

.calculator-results-body {
    padding: 25px;
    position: relative;
}

/* Close button styles */
.close-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-button:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-layout {
        flex-direction: column;
    }
    
    .calculator-body {
        padding: 15px;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .radio-group, .checkbox-group {
        flex-direction: column;
    }
}
