/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* Main Content */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Form Styles */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.form-label i {
    color: #667eea;
    width: 22px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Form Input Fields */
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: #fff;
    min-height: 56px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #bdc3c7;
    font-size: 0.95rem;
}

/* Form Select Fields */
.form-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-hint {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Number Input Container */
.number-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    border: 2px solid #e1e8ed;
    transition: all 0.3s ease;
    min-height: 56px;
    box-sizing: border-box;
}

.number-input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.number-input {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 8px;
    min-height: 40px;
    box-sizing: border-box;
}

.number-input:focus {
    box-shadow: none;
    transform: none;
    outline: none;
}

.number-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.number-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.number-btn:active {
    transform: scale(0.95);
}

.duration-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 12px;
    white-space: nowrap;
}

/* Amount Paid Field Special Styling */
#amountPaid {
    font-weight: 700;
    color: #1e8449;
    font-size: 1.2rem;
    text-align: center;
}

#amountPaid:focus {
    color: #1e8449;
}

/* Amount Paid Label */
label[for="amountPaid"] {
    color: #1e8449;
    font-weight: 700;
}

label[for="amountPaid"] i {
    color: #1e8449;
    font-size: 1.2rem;
}

/* Amount Paid Container */
.number-input-container:has(#amountPaid) {
    background: linear-gradient(135deg, #e8f8f0, #d5f4e6, #a9dfbf);
    border-color: #1e8449;
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(30, 132, 73, 0.1);
}

.number-input-container:has(#amountPaid):focus-within {
    border-color: #1e8449;
    box-shadow: 0 0 0 4px rgba(30, 132, 73, 0.15);
    transform: translateY(-1px);
}

/* Amount Paid Unit */
.number-input-container:has(#amountPaid) .duration-unit {
    color: #1e8449;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Amount Paid Buttons */
.number-input-container:has(#amountPaid) .number-btn {
    background: linear-gradient(135deg, #1e8449, #27ae60, #2ecc71);
    box-shadow: 0 3px 10px rgba(30, 132, 73, 0.3);
}

.number-input-container:has(#amountPaid) .number-btn:hover {
    background: linear-gradient(135deg, #27ae60, #2ecc71, #58d68d);
    box-shadow: 0 5px 15px rgba(30, 132, 73, 0.4);
    transform: scale(1.05);
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 20px 32px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn i {
    font-size: 1.2rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-width: 400px;
    width: 90%;
}

.success-message i {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

.success-message h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.success-message p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Error States */
.form-input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .form-container {
        padding: 25px 20px;
        margin: 8px;
        border-radius: 20px;
    }
    
    .logo {
        width: 140px;
    }
    
    .form-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .booking-form {
        gap: 24px;
    }
    
    .form-group {
        gap: 8px;
    }
    
    .form-label {
        font-size: 1rem;
        gap: 8px;
    }
    
    .form-label i {
        width: 20px;
        font-size: 1rem;
    }
    
    .form-input,
    .form-select {
        padding: 14px 16px;
        min-height: 50px;
        font-size: 0.95rem;
    }
    
    .form-select {
        padding-right: 44px;
        background-size: 14px;
        background-position: right 12px center;
    }
    
    .number-input-container {
        min-height: 50px;
        gap: 8px;
        padding: 6px;
    }
    
    .number-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .number-input {
        font-size: 1rem;
        padding: 8px 6px;
        min-height: 34px;
    }
    
    .duration-unit {
        font-size: 0.95rem;
        padding: 0 8px;
    }
    
    /* Amount Paid Mobile */
    #amountPaid {
        font-size: 1.1rem;
    }
    
    label[for="amountPaid"] {
        font-size: 1rem;
    }
    
    label[for="amountPaid"] i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .form-container {
        padding: 20px 16px;
        margin: 4px;
        border-radius: 16px;
    }
    
    .logo {
        width: 110px;
    }
    
    .form-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .booking-form {
        gap: 20px;
    }
    
    .form-group {
        gap: 6px;
    }
    
    .form-label {
        font-size: 0.95rem;
        gap: 6px;
    }
    
    .form-label i {
        width: 18px;
        font-size: 0.95rem;
    }
    
    .form-input,
    .form-select {
        padding: 12px 14px;
        min-height: 46px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .form-select {
        padding-right: 40px;
        background-size: 12px;
        background-position: right 10px center;
    }
    
    .number-input-container {
        min-height: 46px;
        gap: 6px;
        padding: 4px;
        border-radius: 10px;
    }
    
    .number-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .number-input {
        font-size: 0.95rem;
        padding: 6px 4px;
        min-height: 30px;
    }
    
    .duration-unit {
        font-size: 0.9rem;
        padding: 0 6px;
    }
    
    /* Amount Paid Small Mobile */
    #amountPaid {
        font-size: 1rem;
    }
    
    label[for="amountPaid"] {
        font-size: 0.95rem;
    }
    
    label[for="amountPaid"] i {
        font-size: 1rem;
    }
    
    .submit-btn {
        padding: 16px 20px;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 10px;
        margin-top: 20px;
    }
    
    .submit-btn i {
        font-size: 1.1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .container {
        padding: 6px;
    }
    
    .form-container {
        padding: 16px 12px;
        margin: 2px;
        border-radius: 12px;
    }
    
    .logo {
        width: 100px;
    }
    
    .form-title {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }
    
    .booking-form {
        gap: 18px;
    }
    
    .form-input,
    .form-select {
        padding: 10px 12px;
        min-height: 44px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .number-input-container {
        min-height: 44px;
        gap: 4px;
        padding: 3px;
        border-radius: 8px;
    }
    
    .number-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .number-input {
        font-size: 0.9rem;
        padding: 4px 2px;
        min-height: 28px;
    }
    
    .duration-unit {
        font-size: 0.85rem;
        padding: 0 4px;
    }
    
    .submit-btn {
        padding: 14px 16px;
        font-size: 0.95rem;
        min-height: 48px;
        border-radius: 8px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}
