@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700&display=swap');

@font-face {
    font-family: 'koodak';
    src: url('../fonts/B-Koodak-Bold.ttf');
    font-family: 'titr';
    src: url('../fonts/B-Titr-Bold.ttf');
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #117a2a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: #117a2a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Layout */
.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    overflow: hidden;
}

/* Right info section */
.info-container {
    background: transparent;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    text-align: center;
    width: 100%;
}

.info-container h1 {
    font-size: 2rem;
    font-family: 'titr', sans-serif;
    margin-bottom: 1.5rem;
    font-weight: 900;
    color: #ad031a;
    line-height: 1.3;
}

.info-content p {
    line-height: 1.8;
    font-size: 1rem;
    text-align: center;
    color: white;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.info-content a {
    text-decoration: none;
    color: rgb(34, 48, 92);
    font-weight: 700;
}

/* Left form section */
.form-container {
    background: #e7e7e7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
    border: none;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo img {
    width: 200px;
    max-width: 100%;
    height: auto;
}

.form-body {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background-color: #f1f1f1;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: 0.4s ease-in-out;
    box-shadow: rgba(48, 47, 47, 0.4) 2px 2px 2px;
}

.form-body:hover {
    transform: translateX(-0.25em) translateY(-0.25em);
    border: 1px solid #171717;
    box-shadow: 5px 5px 0px rgba(194, 194, 194, 0.4);
}

/* Inputs */
.form-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.row-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #000;
    border: none;
    border-bottom: 1px solid #000;
    background: transparent;
    outline: none;
    transition: 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.form-group label {
    position: absolute;
    right: 0;
    top: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s ease;
    background-color: transparent;
    padding: 0 0.25rem;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group select:focus ~ label,
.form-group select:not([value=""]) ~ label {
    top: -0.75rem;
    font-size: 0.875rem;
    color: #950316;
}

.form-group input:hover, .form-group select:hover {
    background-color: rgba(194, 194, 194, 0.4);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

/* Error styles */
.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    text-align: right;
    min-height: 1rem;
}

.form-group.error input,
.form-group.error select {
    border-bottom-color: #ef4444;
}

/* Buttons */
.btn {
    height: 3rem;
    width: 10rem;
    background-color: #950316;
    border-radius: 10000rem;
    border: none;
    font-size: 1.2rem;
    transition: all 400ms;
    color: white;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.btn:hover {
    background-color: #a8192c;
    box-shadow: none;
}

.btn:disabled {
    background-color: #64748b;
    cursor: not-allowed;
}

.btn-box {
    margin-top: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    gap: 40px;
    justify-content: space-between;
    align-items: center;
}

/* Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    width: 100%;
}

.success-message {
    background: #117a2a;
    color: white;
}

.error-message {
    background: #ef4444;
    color: white;
}

.progress-container {
    flex: 1;
    width: 100%;
    padding-left: 0px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #ddd;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background-color: #950316;
    width: 0%;
    transition: width 0.3s ease;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #666;
    border: 3px solid #ddd;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.step.active .step-number {
    background-color: #950316;
    color: white;
    border-color: #950316;
}

.step.completed .step-number {
    background-color: #117a2a;
    color: white;
    border-color: #117a2a;
}

/* Form Steps */
.form-step {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

.button-group {
    display: flex;
    flex: 1;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.btn-secondary {
    background-color: #64748b;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tablet and larger phones (768px and up) */
@media (min-width: 768px) {
    .container {
        flex-direction: row;
        height: auto;
        min-height: 100vh;
    }
    
    .info-container {
        width: 40%;
        padding: 3rem 2rem;
        justify-content: center;
    }
    
    .info-container h1 {
        font-size: 2.5rem;
        margin-bottom: 6rem;
    }
    
    .form-container {
        width: 60%;
        padding: 3rem 2rem;
        border-right: #2e2e2e 6.5px solid;
    }
    
    .form-body {
        padding: 2rem;
    }
    
    .row-group {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .button-group {
        justify-content: center;
    }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
    .info-container h1 {
        font-size: 3rem;
    }
    
    .form-body {
        max-width: 600px;
        padding: 2.5rem;
    }
    
    .logo img {
        width: 250px;
    }
    .btn-box {
        flex-direction: row;
        gap: 20px;

    }
    .button-group {
    width: 50%;
}
.progress-container {
    width: 50%;
}
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .info-container h1 {
        font-size: 3.5rem;
    }
    
    .info-container {
        padding: 4rem 3rem;
    }
    
    .form-container {
        padding: 4rem 3rem;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 0.5rem;
    }
    
    .form-body {
        padding: 1.25rem;
    }
    
    .logo img {
        width: 180px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* بهبود استایل پیام‌های خطا */
.error-message {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    width: 100%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.success-container {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.success-container h2 {
    color: #10b981;
    margin-bottom: 1rem;
}

.success-container p {
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tracking-code {
    font-size: 2rem;
    font-weight: bold;
    color: #950316;
    background-color: #f8fafc;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: 2px dashed #950316;
    margin: 1.5rem 0;
    direction: ltr;
    display: inline-block;
    font-family: monospace;
    letter-spacing: 2px;
}

.success-note {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

#newRegistrationBtn {
    margin-top: 1rem;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* بهبود استایل پیام‌های خطا */
.error-message {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    width: 100%;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    width: 100%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.other-field-container {
    margin-top: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.other-field-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color 0.3s ease;
}

.other-field-container input:focus {
    outline: none;
    border-color: #950316;
}

/* بهبود استایل برای selectها */
.form-group select {
    cursor: pointer;
}

/* بهبود responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .other-field-container {
        margin-top: 0.5rem;
    }
}