/**
 * Frontend Styles
 * THE ESPY HOSTEL - Guest Registration System
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Header */
.header {
    background: #000;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.header-logo {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 5px;
}

.header-logo .space {
    color: transparent;
}

.header-subtitle {
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    font-weight: 300;
    margin-top: 10px;
}

/* Main Content */
.main-content {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* Form Card */
.form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 40px 50px;
    max-width: 700px;
    margin: 0 auto;
}

/* Utility Classes */
.mb-4 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

/* Form Elements */
.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-control::placeholder {
    color: #aaa;
}

.form-text {
    color: #666;
    font-size: 0.875rem;
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #a8b4c4;
    border: 1px solid #98a4b4;
    color: #333;
}

.btn-primary:hover {
    background: #98a4b4;
    border-color: #8894a4;
}

.btn-success {
    background: #a8c4b4;
    border: 1px solid #98b4a4;
    color: #333;
}

.btn-danger {
    background: #c4a8a8;
    border: 1px solid #b49898;
    color: #333;
}

.btn-dark {
    background: #333;
    border: 1px solid #333;
    color: #fff;
}

.btn-dark:hover {
    background: #444;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
}

.btn-outline-secondary:hover {
    background: #f5f5f5;
}

/* Row with two columns */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row > * {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

/* Guest Confirmation */
.confirmation-section {
    text-align: center;
    padding: 20px 0;
}

.confirmation-question {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.confirmation-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
}

.confirmation-buttons .btn {
    min-width: 120px;
}

/* Photo Capture */
.photo-section {
    margin-bottom: 30px;
}

.photo-preview {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    overflow: hidden;
}

.photo-preview img,
.photo-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Signature Pad */
.signature-section {
    margin-bottom: 30px;
}

.signature-pad-wrapper {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    margin: 15px 0;
}

.signature-pad {
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

.signature-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px;
    border-top: 1px solid #eee;
}

/* House Rules */
.house-rules {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.house-rules h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.house-rules h4 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.house-rules ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.house-rules li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.house-rules p {
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Terms Checkbox */
.terms-section {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.terms-section .form-check {
    margin: 0;
}

.terms-section .form-check-label {
    font-weight: 500;
}

.terms-warning {
    color: #c62828;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Success Page */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 5rem;
    color: #4caf50;
    margin-bottom: 20px;
}

.success-message h2 {
    color: #333;
    margin-bottom: 15px;
}

.success-message p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Hidden */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .header-logo {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.2em;
    }

    .form-card {
        padding: 20px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .confirmation-buttons {
        flex-direction: column;
    }

    .confirmation-buttons .btn {
        width: 100%;
    }
}
