﻿/* ========================================
   KOTGEM WiFi Portal - Mobile-First CSS
   ======================================== */

/* CSS Variables - Tenant tarafından override edilebilir */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Info Box */
.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

    .info-box p {
        color: var(--text-secondary);
        font-size: 0.875rem;
        line-height: 1.5;
        margin: 0;
    }

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .error-message::before {
        content: "⚠️";
        font-size: 1.25rem;
    }

/* Success Message */
.success-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: var(--success-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .success-message::before {
        content: "✓";
        font-size: 1.25rem;
    }

/* Form Styles */
.phone-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

    .phone-input-wrapper:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.phone-prefix {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-right: 2px solid var(--border-color);
}

.phone-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

    .phone-input::placeholder {
        color: #9ca3af;
    }

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* OTP Input */
.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.otp-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s;
}

    .otp-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover:not(:disabled) {
        background: var(--primary-hover);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

    .btn-primary:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-loading {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer Info */
.footer-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.small-text {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0;
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .checkbox-wrapper:hover {
        background: var(--bg-light);
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
        cursor: pointer;
        flex-shrink: 0;
        margin-top: 0.125rem;
    }

.checkbox-label {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

    .checkbox-label a {
        color: var(--primary-color);
        text-decoration: none;
    }

        .checkbox-label a:hover {
            text-decoration: underline;
        }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Timer */
.timer {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

    .timer.warning {
        color: var(--warning-color);
    }

/* Link Button */
.link-button {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

    .link-button:hover {
        color: var(--primary-hover);
    }

    .link-button:disabled {
        color: var(--text-secondary);
        cursor: not-allowed;
        text-decoration: none;
    }

/* ========================================
   RESPONSIVE - Tablet & Desktop
   ======================================== */

@media (min-width: 768px) {
    .container {
        padding: 2.5rem;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .brand-name {
        font-size: 1.875rem;
    }

    .phone-input,
    .btn-primary {
        font-size: 1.125rem;
    }

    .otp-input {
        width: 3.5rem;
        height: 4rem;
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    body {
        padding: 2rem;
    }

    .container {
        max-width: 480px;
        padding: 3rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-white: #1f2937;
        --bg-light: #374151;
        --border-color: #4b5563;
    }

    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    /* ========================================
   VERIFY PAGE - EK STİLLER
   main.css dosyasının SONUNA ekleyin
   ======================================== */

    /* Phone Display */
    .phone-display {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-top: 0.5rem;
    }

    /* Resend Container */
    .resend-container {
        text-align: center;
        margin-top: 1rem;
    }

    /* OTP Form */
    .otp-form {
        margin-bottom: 1.5rem;
    }

    /* Timer renk değişimi için */
    .timer.warning strong {
        color: var(--warning-color);
    }
    /* ========================================
   CONSENT PAGE - EK STİLLER
   main.css dosyasının SONUNA ekleyin
   ======================================== */

    /* Consent Form */
    .consent-form {
        margin-bottom: 1.5rem;
    }

    /* Consent Text Box */
    .consent-text-box {
        background: var(--bg-light);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        max-height: 400px;
        overflow-y: auto;
    }

        .consent-text-box h3 {
            color: var(--text-primary);
            font-size: 1.125rem;
            margin-bottom: 1rem;
        }

    .consent-text {
        color: var(--text-secondary);
        font-size: 0.875rem;
        line-height: 1.7;
    }

        .consent-text p {
            margin-bottom: 0.75rem;
        }

        .consent-text ul {
            margin: 0.75rem 0 0.75rem 1.5rem;
            padding: 0;
        }

        .consent-text li {
            margin-bottom: 0.5rem;
        }

        .consent-text a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

            .consent-text a:hover {
                text-decoration: underline;
            }

    /* Checkbox Wrapper Variants */
    .checkbox-wrapper.required {
        border: 2px solid var(--primary-color);
        background: rgba(37, 99, 235, 0.05);
    }

    .checkbox-wrapper.optional {
        border: 1px solid var(--border-color);
    }

    .checkbox-wrapper.required:hover {
        background: rgba(37, 99, 235, 0.1);
    }

    /* Scrollbar Styling (webkit browsers) */
    .consent-text-box::-webkit-scrollbar {
        width: 8px;
    }

    .consent-text-box::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: var(--radius-sm);
    }

    .consent-text-box::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: var(--radius-sm);
    }

        .consent-text-box::-webkit-scrollbar-thumb:hover {
            background: var(--text-secondary);
        }

    /* Mobile Adjustments for Consent */
    @media (max-width: 768px) {
        .consent-text-box {
            max-height: 300px;
            padding: 1rem;
        }

        .consent-text {
            font-size: 0.813rem;
        }
    }
}
