/* =====================
   register.css
   Place in: public/css/register.css
   ===================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f4f4;
}

/* =====================
   Alerts
   ===================== */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =====================
   Registration Container
   ===================== */
.registration-container {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* =====================
   Header
   ===================== */
.header {
    text-align: center;
    background: #fe0100;
    padding: 20px;
    position: relative;
}
.header img {
    height: 60px;
}
.login-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.login-link:hover {
    text-decoration: underline;
}

/* =====================
   Steps
   ===================== */
.step {
    display: none;
    padding: 30px;
}
.step.active {
    display: block;
}
.step h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-left: 4px solid #fe0100;
    padding-left: 10px;
}

/* =====================
   Form Elements
   ===================== */
.step label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.step input,
.step select,
.step textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.step input:focus,
.step select:focus,
.step textarea:focus {
    border-color: #fe0100;
    outline: none;
}

.step textarea {
    resize: vertical;
    min-height: 80px;
}

input.invalid,
select.invalid {
    border: 1px solid red !important;
}

/* =====================
   Buttons
   ===================== */
.btn {
    padding: 10px 20px;
    background: #fe0100;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:hover {
    background: #c50000;
}
.btn.btn-secondary {
    background: #6c757d;
}
.btn.btn-secondary:hover {
    background: #545b62;
}
.btn-verify {
    padding: 10px 16px;
    background: #10005e;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-verify:hover {
    background: #0a0040;
}
.btn-verify:disabled {
    background: #28a745;
    cursor: default;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* =====================
   OTP Block
   ===================== */
.otp-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
}
.otp-input {
    flex: 1;
    max-width: 140px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* =====================
   Error / Success Box
   ===================== */
.error {
    padding: 10px;
    margin: 10px 30px;
    font-size: 14px;
    border-radius: 5px;
    display: block;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
.error.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}
.error-msg {
    font-size: 0.875em;
    color: red;
    margin-top: -12px;
    padding: 0 0 12px 0;
    display: block;
}

/* =====================
   Opening Days Checkboxes
   ===================== */
.day-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5px;
    gap: 8px;
}
.day-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f8f8;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.day-checkbox:hover {
    background: #ffe5e5;
    border-color: #fe0100;
}
.day-checkbox input[type="checkbox"] {
    margin: 0;
    width: auto;
    padding: 0;
    transform: scale(1.1);
    accent-color: #fe0100;
}
#opening_days_error {
    margin-bottom: 10px;
}

/* =====================
   Coordinates Row
   ===================== */
.coord-row {
    display: flex;
    gap: 15px;
}
.coord-field {
    flex: 1;
}

/* =====================
   Map Preview Box (in form)
   ===================== */
.map-preview-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}
.map-preview-box:hover {
    border-color: #fe0100;
    background: #fff5f5;
    color: #fe0100;
}
.map-preview-box i {
    font-size: 22px;
    color: #fe0100;
}
.map-preview-box.confirmed {
    border-color: #28a745;
    background: #f0fff4;
    color: #155724;
}
.map-preview-box.confirmed i {
    color: #28a745;
}

/* =====================
   Select2 Overrides
   ===================== */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 4px;
    min-height: 40px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #fe0100;
    border: none;
    color: #fff;
    padding: 3px 6px;
    margin-top: 4px;
    border-radius: 3px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 4px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 18px !important;
}

/* =====================
   Modal Overlay
   ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s ease;
    max-height: 90vh;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fe0100;
    color: #fff;
}
.modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: opacity 0.15s;
}
.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
}

#map {
    height: 380px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.map-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.btn-locate {
    background: none;
    border: 2px solid #fe0100;
    color: #fe0100;
    padding: 7px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s;
}
.btn-locate:hover {
    background: #fe0100;
    color: #fff;
}
.coord-display {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #555;
}
.coord-display span {
    background: #f4f4f4;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-family: monospace;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 600px) {
    .registration-container {
        margin: 10px;
        border-radius: 8px;
    }
    .step {
        padding: 20px;
    }
    .coord-row {
        flex-direction: column;
        gap: 0;
    }
    .map-preview-box {
        padding: 14px;
    }
    #map {
        height: 280px;
    }
    .modal-box {
        max-height: 95vh;
    }
    .day-checkbox-group {
        gap: 6px;
    }
}