/**
 * EP Profil Calculator Styles
 * Enhanced with animations and modern styling
 */

/* Animations & Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(227, 6, 19, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(227, 6, 19, 0);
    }
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-45deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Main container */
.ep-profil-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ep-profil-calculator-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Tabs */
.calculator-tabs {
    display: flex;
    border-bottom: 2px solid #e1e1e1;
    background: linear-gradient(to bottom, #f9f9f9, #f2f2f2);
    position: relative;
    overflow: hidden;
}

.calculator-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #E30613, #ff4747, #E30613);
    background-size: 200% auto;
    animation: gradientAnimation 3s ease infinite;
}

.calculator-tabs .tab {
    padding: 18px 24px;
    cursor: pointer;
    flex: 1;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.calculator-tabs .tab::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #E30613, #ff4747);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.calculator-tabs .tab:hover::before {
    transform: translateX(0);
}

.calculator-tabs .tab:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #222;
    transform: translateY(-2px);
}

.calculator-tabs .tab.active {
    background-color: #fff;
    border-bottom: 3px solid #E30613;
    color: #E30613;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.calculator-tabs .tab.active::before {
    transform: translateX(0);
}

.calculator-tabs .tab i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.calculator-tabs .tab:hover i {
    transform: translateY(-2px);
}

/* Calculator content */
.calculator-content {
    padding: 30px;
    animation: fadeIn 0.6s ease-out forwards;
}

.ep-calculator-form {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.ep-calculator-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease-out forwards;
}

.calculator-intro {
    margin-bottom: 30px;
    animation: slideIn 0.6s ease-out forwards;
    position: relative;
    padding-left: 20px;
}

.calculator-intro::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #E30613, #ff4747);
    border-radius: 4px;
}

.calculator-intro p {
    font-size: 17px;
    line-height: 1.6;
    color: #444;
}

/* Form styles */
.calculator-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.form-group:hover {
    transform: translateY(-2px);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px 25px -12px;
    animation: slideIn 0.5s ease-out forwards;
}

.form-row .form-group {
    flex: 1;
    padding: 0 12px;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 18px;
}

label::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #E30613;
    font-size: 18px;
}

label:hover {
    color: #E30613;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: #bbb;
}

.form-control:focus {
    border-color: #E30613;
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15);
    transform: translateY(-2px);
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn i, .btn svg {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn:hover i, .btn:hover svg {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #E30613, #ff4747);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d00512, #ff3b3b);
}

.btn-secondary {
    background: linear-gradient(135deg, #555, #444);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #444, #333);
}

.btn-accent {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #0ea271, #048a61);
}

.btn-cta {
    animation: pulse 2s infinite;
}

/* Results styles */
.calculator-results {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.7s ease-out forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #E30613;
}

.calculator-results:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.calculator-results h3 {
    color: #222;
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    display: inline-block;
}

.calculator-results h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #E30613, #ff4747);
    border-radius: 3px;
    background-size: 200% auto;
    animation: gradientAnimation 3s ease infinite;
}

.results-data {
    margin-bottom: 35px;
    animation: scaleUp 0.5s ease-out forwards;
}

.results-header {
    margin-bottom: 20px;
    animation: slideIn 0.6s ease-out forwards;
}

.results-header h4 {
    color: #E30613;
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.results-header h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #E30613;
}

.results-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.7s ease-out forwards;
}

.results-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.results-section h5 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.results-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #eaeaea;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.results-row:hover {
    background-color: rgba(227, 6, 19, 0.03);
}

.results-label {
    flex: 1;
    font-weight: 600;
    color: #444;
    transition: color 0.3s ease;
}

.results-row:hover .results-label {
    color: #E30613;
}

.results-value {
    min-width: 120px;
    text-align: right;
    font-weight: 600;
    color: #333;
    transition: transform 0.3s ease;
}

.results-row:hover .results-value {
    transform: scale(1.05);
}

.total-cost {
    font-size: 20px;
    padding: 15px 10px;
    margin-top: 20px;
    border-top: 2px solid #e1e1e1;
    background-color: #f3f3f3;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.total-cost:hover {
    transform: translateY(-2px);
}

.total-cost .results-label {
    font-weight: 700;
    color: #333;
}

.total-cost .results-value {
    font-weight: 800;
    color: #E30613;
    font-size: 22px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.results-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Modal styles */
.ep-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ep-modal.active {
    opacity: 1;
}

.ep-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    animation: modalAnimation 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.ep-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #E30613, #ff4747);
    background-size: 200% auto;
    animation: gradientAnimation 3s ease infinite;
}

@keyframes modalAnimation {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ep-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 26px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f5f5f5;
    z-index: 2;
}

.ep-modal-close:hover {
    color: #E30613;
    background-color: #eee;
    transform: rotate(90deg);
}

.order-summary {
    margin-bottom: 35px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #E30613;
    animation: fadeIn 0.6s ease-out forwards;
}

.order-summary h4 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.order-summary h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, #E30613, #ff4747);
}

.order-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.order-field {
    margin-bottom: 20px;
    animation: slideIn 0.5s ease-out forwards;
}

.order-field:nth-child(2) { animation-delay: 0.1s; }
.order-field:nth-child(3) { animation-delay: 0.2s; }
.order-field:nth-child(4) { animation-delay: 0.3s; }
.order-field:nth-child(5) { animation-delay: 0.4s; }

.order-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
}

.order-field input,
.order-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.order-field input:hover,
.order-field textarea:hover {
    border-color: #bbb;
}

.order-field input:focus,
.order-field textarea:focus {
    border-color: #E30613;
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15);
    transform: translateY(-2px);
}

/* Success message */
.order-success {
    text-align: center;
    padding: 40px 0;
    animation: scaleUp 0.6s ease-out forwards;
}

.success-icon {
    font-size: 70px;
    color: #2ecc71;
    margin-bottom: 25px;
    animation: rotateIn 0.6s ease-out forwards;
}

.order-success h4 {
    color: #2ecc71;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.order-success p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#order-number {
    font-weight: 700;
    color: #E30613;
    font-size: 20px;
    padding: 5px 15px;
    background-color: #f3f3f3;
    border-radius: 6px;
    display: inline-block;
    margin: 10px 0;
    border: 1px dashed #ddd;
}

.error-message {
    padding: 15px;
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    border-left: 4px solid #ef4444;
    animation: shake 0.5s ease-out forwards;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s infinite linear;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tips & Requirements note */
.calculator-tips {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff9ed;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.7s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.calculator-tips::before {
    content: '💡';
    position: absolute;
    font-size: 40px;
    top: -5px;
    right: 15px;
    opacity: 0.2;
    transform: rotate(15deg);
}

.calculator-tips h5 {
    color: #92400e;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.calculator-tips p, .calculator-tips li {
    color: #78350f;
    font-size: 16px;
    line-height: 1.6;
}

.calculator-tips ul {
    padding-left: 20px;
}

.calculator-tips li {
    margin-bottom: 8px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .calculator-content {
        padding: 20px;
    }
    
    .form-row .form-group {
        flex: 100%;
        margin-bottom: 15px;
    }
    
    .results-action {
        flex-direction: column;
    }
    
    .results-action .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .ep-modal-content {
        width: 95%;
        padding: 25px;
        margin: 5% auto;
    }
    
    .calculator-tabs {
        flex-wrap: wrap;
    }
    
    .calculator-tabs .tab {
        flex: 0 0 50%;
        padding: 15px;
    }
    
    .btn {
        padding: 12px 20px;
        width: 100%;
    }
    
    .order-form {
        grid-template-columns: 1fr;
    }
    
    .ep-modal-close {
        top: 10px;
        right: 10px;
    }
    
    .calculator-results h3 {
        font-size: 20px;
    }
    
    .results-header h4 {
        font-size: 18px;
    }
    
    .total-cost .results-value {
        font-size: 20px;
    }
}