/* ============================================
   Site Registration Form Styles
   Quindío es Mío — Pre-Registro de Sitios
   ============================================ */

/* --- Section Headers --- */
.sr-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(25, 133, 161, 0.15);
}

.sr-section:last-child {
    border-bottom: none;
}

.sr-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1985a1, #00c2cb);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

.sr-section-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.sr-section-subtitle {
    font-size: 13px;
    color: #7f8c8d;
    margin-left: 42px;
    margin-top: -15px;
    margin-bottom: 20px;
}

/* --- Form Fields --- */
.sr-form .form-group {
    margin-bottom: 18px;
}

.sr-form .form-control {
    border: 1px solid #dde3e8;
    border-radius: 8px;
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.sr-form .form-control:focus {
    border-color: #1985a1;
    box-shadow: 0 0 0 3px rgba(25, 133, 161, 0.12);
    outline: none;
}

.sr-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237f8c8d' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.sr-form textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 12px 16px;
    resize: vertical;
}

.sr-form textarea.form-control#description {
    padding-top: 16px;
    padding-bottom: 16px;
    margin-top: 6px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.sr-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 6px;
    display: block;
}

.sr-form .form-label .required-indicator {
    color: #e74c3c;
    margin-left: 2px;
}

.sr-form .field-hint {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 4px;
}

/* --- Categories (Pill-Style Checkboxes) --- */
.sr-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.sr-category-item {
    position: relative;
}

.sr-category-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sr-category-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0f4f8;
    border: 2px solid #dde3e8;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #34495e;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.sr-category-label:hover {
    border-color: #1985a1;
    background: #e8f4f8;
}

.sr-category-item input[type="checkbox"]:checked + .sr-category-label {
    background: linear-gradient(135deg, #1985a1, #00c2cb);
    border-color: #1985a1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(25, 133, 161, 0.3);
}

.sr-category-item.disabled .sr-category-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.sr-categories-counter {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 8px;
}

.sr-categories-counter.limit-reached {
    color: #e67e22;
    font-weight: 600;
}

/* --- Image Upload Zone --- */
.sr-image-drop-zone {
    border: 2px dashed #c5d0d8;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.sr-image-drop-zone:hover,
.sr-image-drop-zone.dragover {
    border-color: #1985a1;
    background: #e8f4f8;
}

.sr-image-drop-zone .drop-icon {
    font-size: 40px;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.sr-image-drop-zone .drop-text {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.sr-image-drop-zone .drop-text-small {
    font-size: 12px;
    color: #95a5a6;
}

.sr-image-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- Image Preview Grid --- */
.sr-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.sr-image-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #eee;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: grab;
}

.sr-image-preview-item:active {
    cursor: grabbing;
}

.sr-image-preview-item.is-main {
    border-color: #1985a1;
    box-shadow: 0 0 0 2px rgba(25, 133, 161, 0.2);
}

.sr-image-preview-item.converting {
    opacity: 0.7;
}

.sr-image-preview-item.error {
    border-color: #e74c3c;
}

.sr-image-preview-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.sr-image-preview-info {
    padding: 8px 10px;
    font-size: 11px;
    color: #555;
}

.sr-image-preview-info .img-dimensions {
    font-weight: 600;
}

.sr-image-preview-info .img-size {
    color: #7f8c8d;
}

/* Image Status Badge */
.sr-image-status {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.sr-image-status.converting {
    background: #fff3cd;
    color: #856404;
}

.sr-image-status.ready {
    background: #d4edda;
    color: #155724;
}

.sr-image-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Main Image Badge */
.sr-main-image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #1985a1, #00c2cb);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Remove Button */
.sr-image-remove {
    position: absolute;
    bottom: 55px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease;
    padding: 0;
}

.sr-image-remove:hover {
    transform: scale(1.15);
    background: #c0392b;
}

/* Drag Handle */
.sr-drag-handle {
    position: absolute;
    bottom: 55px;
    left: 8px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 26px;
    text-align: center;
    cursor: grab;
    z-index: 3;
}

/* --- Dragging State --- */
.sr-image-preview-item.dragging {
    opacity: 0.4;
    border-style: dashed;
}

.sr-image-preview-item.drag-over {
    border-color: #00c2cb;
    background: #e8f4f8;
}

/* --- Location Section --- */
.sr-location-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sr-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #1985a1;
    border-radius: 8px;
    color: #1985a1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.sr-location-btn:hover {
    background: #1985a1;
    color: #fff;
}

.sr-location-btn i {
    font-size: 16px;
}

.sr-location-status {
    font-size: 12px;
    color: #27ae60;
    margin-top: 6px;
    display: none;
}

.sr-location-status.error {
    color: #e74c3c;
}

.sr-location-status.visible {
    display: block;
}

/* --- Terms & Conditions --- */
.sr-terms-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.sr-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #34495e;
    cursor: pointer;
    line-height: 1.5;
}

.sr-terms-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #1985a1;
}

.sr-terms-label a {
    color: #1985a1;
    text-decoration: underline;
}

/* --- Honeypot (oculto) --- */
.sr-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
    tab-index: -1;
}

/* --- Submit Button --- */
.sr-submit-wrapper {
    text-align: center;
    margin-top: 30px;
}

.sr-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 250px;
    height: 56px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1985a1, #00c2cb);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sr-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 133, 161, 0.35);
}

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

.sr-submit-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sr-spin 0.8s linear infinite;
}

.sr-submit-btn.loading .spinner {
    display: inline-block;
}

.sr-submit-btn.loading .btn-text {
    display: none;
}

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

/* --- Loading Overlay --- */
.sr-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 10px;
}

.sr-loading-overlay.active {
    display: flex;
}

.sr-loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #1985a1;
    border-radius: 50%;
    animation: sr-spin 0.8s linear infinite;
}

.sr-loading-overlay .loading-text {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* --- Success Message --- */
.sr-success-message {
    text-align: center;
    padding: 70px 40px;
    background-color: #ecfdf5;
    border: 2px solid #a7f3d0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.05);
    max-width: 600px;
    margin: 40px auto;
    animation: sr-fadeIn 0.5s ease;
}

.sr-success-message .success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #059669, #10b981);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
    color: #fff;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.2);
}

.sr-success-message h3 {
    font-size: 28px;
    color: #065f46;
    margin-bottom: 15px;
    font-weight: 700;
}

.sr-success-message p {
    font-size: 16px;
    color: #047857;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

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

/* --- Error Summary Box --- */
.site-reg-errors {
    background-color: #fdf2f2;
    border: 2px solid #f8b4b4;
    color: #9b1c1c;
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(155, 28, 28, 0.05);
    animation: sr-fadeIn 0.4s ease;
}
.site-reg-errors p {
    margin-bottom: 12px;
    color: #9b1c1c;
    font-weight: bold;
    font-size: 16px;
}
.site-reg-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
    text-align: center;
}
.site-reg-errors li {
    margin-bottom: 6px;
    font-weight: 500;
}

/* --- Error Messages --- */
.sr-field-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}

.sr-field-error.visible {
    display: block;
}

.sr-form .form-control.has-error,
.sr-form .form-control.field-error {
    border: 1px solid #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(230, 76, 60, 0.18) !important;
}

.sr-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.sr-alert.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    display: block;
}

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

/* --- Form Container --- */
.sr-form-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sr-location-inputs {
        grid-template-columns: 1fr;
    }

    .sr-image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .sr-categories-grid {
        gap: 8px;
    }

    .sr-category-label {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sr-section-title {
        font-size: 16px;
    }

    .sr-submit-btn {
        width: 100%;
    }

    .sr-image-drop-zone {
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .sr-image-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
