/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 90%;
    width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e9f2;
}

header h1 {
    color: #3a539b;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header h2 {
    color: #5d6d7e;
    font-weight: 400;
    font-size: 1.2rem;
}

/* Progress Bar */
.progress-container {
    margin: 2rem 0;
    display: block;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
    max-width: 100%;
    width: 100%;
}

.progress-bar::before {
    content: "";
    background-color: #e5e9f2;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    z-index: 1;
}

.progress {
    background-color: #3a539b;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 0%;
    z-index: 1;
    transition: 0.4s ease;
}

.step {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 3px solid #e5e9f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: #5d6d7e;
    transition: 0.4s ease;
}

.step.active {
    border-color: #3a539b;
    color: #3a539b;
}

.step.completed {
    border-color: #3a539b;
    background-color: #3a539b;
    color: #fff;
}

/* Form Parts */
.form-part {
    display: none;
    animation: fadeIn 0.5s ease;
    opacity: 1;
}

.form-part:first-of-type {
    display: block !important;
}

.form-part h3 {
    color: #3a539b;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e9f2;
}

.form-section h4 {
    color: #5d6d7e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-field {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #5d6d7e;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #e5e9f2;
    border-radius: 5px;
    background-color: #f9fafc;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3a539b;
    box-shadow: 0 0 0 3px rgba(58, 83, 155, 0.1);
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input,
.checkbox-label input {
    margin-right: 0.5rem;
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: #3a539b;
}

.authorization {
    padding: 1rem;
    background-color: #f9fafc;
    border-radius: 5px;
    border-left: 4px solid #3a539b;
}

/* Signature Pad */
.signature-pad-container {
    position: relative;
    width: 100%;
    height: 150px;
    border: 1px solid #e5e9f2;
    border-radius: 5px;
    background-color: #fff;
    margin-bottom: 0.5rem;
}

#signature-pad {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #e5e9f2;
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.next-btn,
.submit-btn {
    background-color: #3a539b;
    color: white;
}

.next-btn:hover,
.submit-btn:hover {
    background-color: #2c4178;
}

.prev-btn {
    background-color: #e5e9f2;
    color: #5d6d7e;
}

.prev-btn:hover {
    background-color: #d0d7e6;
}

.clear-btn:hover {
    background-color: #e5e9f2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 1rem;
        margin: 1rem auto;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header h2 {
        font-size: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-field {
        width: 100%;
        min-width: auto;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .prev-btn {
        order: 2;
    }

    .next-btn,
    .submit-btn {
        order: 1;
    }
} 