﻿:root {
    --primary-color: #6b48ff;
    --primary-light: rgba(107, 72, 255, 0.1);
    --primary-dark: #4831d4;
    --gradient: linear-gradient(135deg, #6b48ff, #8a63ff);
    --shadow: 0 4px 20px rgba(107, 72, 255, 0.25);
    --text-color: #1a1a2e;
    --border-color: rgba(107, 72, 255, 0.3);
    --background-light: #f9f7ff;
}

/* Base Styles */
/* Base Styles */
body {
    font-family: "Lato";
    color: var(--text-color);
    background: var(--background-light);
    margin: 0;
    line-height: 1.5;
}

/* Placeholder Styling */
::placeholder {
    color: #a1a1aa;
    font-size: 0.85rem;
  
}

/* Visitor Wrapper */
.visitor-wrapper {
    max-width: 500px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}


    .visitor-wrapper::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: var(--gradient);
        border-radius: 22px;
        z-index: -1;
        opacity: 0.15;
    }
/* Slide-up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 1.7rem;
    text-align: center;
    margin: 0 0 20px;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(107, 72, 255, 0.2);
}

hr {
    border: none;
    height: 3px;
    background: var(--gradient);
    margin: 0 0 25px;
    border-radius: 3px;
    opacity: 0.9;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}
.purpose-row {
    align-items: flex-start;
}

.label-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.label-text {
    font-size: 0.90rem;
}

.required-asterisk {
    color: #ff6f61;
    font-size: 1rem;
    margin-left: 3px;
}

.input-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 280px; /* Reduced max width for smaller inputs */
    position: relative;
}

/* Smaller Input Fields */
.form-control {
    width: 100%;
    padding: 6px 10px; /* Reduced padding for smaller height */
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem; /* Smaller font size */
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 36px; /* Fixed smaller height */
 
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-light);
        outline: none;
    }

/* Error Messages - Fixed Positioning */
.text-danger {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-style: italic;
    position: absolute;
    bottom: -15px; /* Position below the input */
    left: 0;
    width: 100%;
    text-align: left;
}

.purpose-row .text-danger {
    bottom: -20px;
    left: 130px; /* Align with radio group on desktop */
}

/* Radio Buttons */
/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 0.2rem;
    align-items: center; 
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.1rem 0.7rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .radio-label:hover {
        transform: scale(1.05);
        background-color: var(--primary-light);
    }

    

input[type="radio"] {
    accent-color: var(--primary-color);
    width: 12px;
    height: 16px;
}

.radio-label:hover input[type="radio"] {
    transform: scale(1.2); /* Slightly enlarge radio button on hover */
}

.submit-section {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.5rem 1.5rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(107, 72, 255, 0.4);
    }

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.modal-image {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.modal-message {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px;
    text-shadow: 1px 1px 2px rgba(107, 72, 255, 0.1);
}

.modal-close {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}
    .modal-close:hover,
    .modal-close:focus {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(107, 72, 255, 0.3);
    }

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e4e8;
    border-top: 5px solid var(--primary-color);
    border-right: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1.2s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .visitor-wrapper {
        padding: 1.5rem;
        margin: 1.5rem;
    }
    

    h2 {
        font-size: 1.6rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .label-icon-wrapper {
        min-width: 0;
    }

    .input-wrapper {
        max-width: 100%; /* Full width on mobile */
        width: 100%; /* Explicitly full width */
    }
    .form-control {
        width: 100%; /* Ensure input fields are full width */
    }

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .purpose-row .text-danger {
        left:0;
    }

    .submit-section {
        display: flex;
        justify-content: center; /* Center the button */
    }

    .btn-primary {
        width: 100%;
        max-width: 200px;
    }

    .modal-content {
        padding: 25px;
        max-width: 85%;
    }

    .modal-image {
        max-height: 140px;
    }

    .modal-message {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .visitor-wrapper {
        padding: 1.25rem;
        margin: 1rem;
    }

    h2 {
        font-size: 1.4rem;
    }
    .form-control {
        padding: 7px 10px;
        height: 32px;
    }

    .btn-primary {
        padding: 7px 18px; /* Even smaller for very small screens */
        max-width: 130px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-image {
        max-height: 120px;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}
