/**
 * Surfboard Rental Steps Page Styles
 * Multi-step form for surfboard rental process
 */

/* Base Styles */
.surfboard-rental-page {
    text-align: center;
    font-family: Arial, sans-serif;
    margin: 20px;
    direction: rtl;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.progress-step {
    flex: 1;
    position: relative;
    text-align: center;
    padding-bottom: 30px;
}

.progress-step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #eee;
    color: #333;
    line-height: 30px;
    display: inline-block;
    font-size: 14px;
    z-index: 2;
    border: 2px solid #eee;
}

.progress-step.active .progress-step-circle {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.progress-step.completed .progress-step-circle {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.progress-step-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    font-size: 12px;
    color: #555;
}

.progress-step.active .progress-step-text {
    color: #333;
    font-weight: bold;
}

.progress-step.completed .progress-step-text {
    color: #333;
}

.progress-line {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #eee;
    z-index: 1;
}

.progress-line-fill {
    background-color: #007bff;
    height: 2px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 0%;
    transition: width 0.4s ease-in-out;
}

/* Step Container */
.step-container {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: none;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step-container:first-of-type {
    display: block;
    border: none;
    background-color: transparent;
    padding: 0;
}

.step-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

/* Form Elements */
.step-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: right;
}

.step-container input[type="tel"],
.step-container input[type="text"],
.step-container input[type="email"],
.step-container input[type="date"] {
    width: calc(100% - 16px);
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    direction: rtl;
}

.step-container textarea {
    width: 100%;
    height: 150px;
    box-sizing: border-box;
    direction: rtl;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

/* Buttons */
.step-container button,
.surfboard-rental-page button {
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.step-container button:hover,
.surfboard-rental-page button:hover {
    background-color: #0056b3;
}

.step-container button:disabled,
.surfboard-rental-page button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.step-container button:disabled:hover,
.surfboard-rental-page button:disabled:hover {
    background-color: #ccc;
}

/* Video Element */
#video {
    width: 100%;
    height: 56.25vw;
    max-height: 400px;
    object-fit: cover;
    position: relative;
    border: none;
    background-color: black;
    border-radius: 8px;
}

.video-hidden {
    display: none !important;
}

/* Signature Pad */
#signature-pad {
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    background: white;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#signature {
    display: block;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#signature-pad button {
    margin-top: 10px;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

#signature-pad button[type="submit"] {
    background-color: #007bff;
}

#signature-pad button[type="button"] {
    background-color: #dc3545;
}

#signature-pad button[type="button"]:hover {
    background-color: #c82333;
}

/* Result Message */
#result {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
}

/* Loading Overlay */
.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    color: white;
    z-index: 1000;
    font-size: 20px;
    text-align: center;
}

.loading::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 5px solid white;
    border-color: white transparent white transparent;
    animation: spin 1.2s linear infinite;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Location Result */
#location-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

#location-result.success {
    background-color: #d4edda;
    color: #155724;
}

#location-result.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Lock Check Message */
#lock-check-message {
    font-size: 18px;
    padding: 20px;
}

/* Gray Image (Hidden by Default) */
#grayImage {
    display: none;
}

/* Canvas (Hidden by Default) */
#canvas {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .progress-indicator {
        width: 95%;
    }

    .progress-step-text {
        font-size: 10px;
    }

    .progress-step-circle {
        width: 30px;
        height: 30px;
        line-height: 26px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .surfboard-rental-page {
        margin: 10px;
    }

    .progress-indicator {
        width: 100%;
        padding: 0 10px;
    }

    .step-container {
        width: 95%;
        padding: 15px;
    }

    .step-container input[type="tel"],
    .step-container input[type="text"],
    .step-container input[type="email"],
    .step-container input[type="date"] {
        width: calc(100% - 12px);
    }

    .step-container button,
    .surfboard-rental-page button {
        padding: 10px 20px;
        font-size: 14px;
    }

    #signature-pad {
        width: 100%;
        box-sizing: border-box;
    }

    #signature {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    #video {
        height: 70vw;
    }
}

/* Form Validation States */
.step-container input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.step-container input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* SMS Verification Form */
#verifyForm {
    margin-top: 20px;
}

#verifyForm input[type="text"] {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    max-width: 200px;
    margin: 0 auto 10px;
}

/* Agreement Textarea */
#message {
    font-size: 14px;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Scan Button */
#startScan {
    background-color: #28a745;
    font-size: 18px;
    padding: 15px 30px;
}

#startScan:hover {
    background-color: #218838;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
