/* Campaign Module Styles */

/* 1. Landing Page Wrapper */
.gls-campaign-wrapper {
    background-color: #f8fafc;
    min-height: 100vh;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gls-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. Grid Layout */
.gls-campaign-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}
@media (min-width: 992px) {
    .gls-campaign-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

/* 3. Content Area */
.gls-campaign-content h1 {
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 800;
}
.gls-campaign-body {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}
.gls-campaign-highlight {
    margin-bottom: 25px;
}
.gls-badge {
    display: inline-block;
    background-color: #fef3c7;
    color: #92400e;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #fde68a;
}

/* 4. Form Card */
.gls-campaign-form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
.gls-campaign-form-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
}
.gls-required {
    color: #ef4444;
}

/* Campaign Grid for Form */
.gls-campaign-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .gls-campaign-grid-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* General Form Group (For checkboxes, captchas) */
.gls-form-group {
    margin-bottom: 1rem;
}
.gls-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}
.gls-form-group input[type="number"],
.gls-form-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    color: #0f172a;
    transition: all 0.2s ease;
    background: #fff;
}
.gls-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Captcha Inline Layout */
.gls-captcha-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}
.gls-captcha-group label {
    margin-bottom: 0 !important;
    white-space: nowrap;
}
.gls-captcha-group input[type="number"] {
    max-width: 120px;
    flex: 1;
}

/* Floating Labels (Standalone Port for Squeeze Mode) */
.gls-floating-label {
    position: relative;
    margin-bottom: 1rem;
    overflow: visible;
}
.gls-floating-label input,
.gls-floating-label select,
.gls-floating-label textarea {
    height: calc(3rem + 2px);
    padding: 1.1rem 0.75rem 0.25rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background-color: #fff;
    width: 100%;
    color: #0f172a;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    margin: 0 !important; /* Override theme defaults (like 30px margin-bottom) */
}
.gls-floating-label select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 10px;
    padding-right: 35px;
}
.gls-floating-label label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.9rem 0.75rem;
    pointer-events: none;
    transition: all 0.2s ease;
    color: #888;
    margin-bottom: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}
.gls-floating-label input:focus ~ label,
.gls-floating-label input:not(:placeholder-shown) ~ label,
.gls-floating-label select:focus ~ label,
.gls-floating-label select:valid ~ label,
.gls-floating-label textarea:focus ~ label,
.gls-floating-label textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 700;
    background: #fff;
    padding: 0 8px;
    height: auto;
    z-index: 10;
}
.gls-floating-label input:focus,
.gls-floating-label select:focus,
.gls-floating-label textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.gls-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}
.gls-btn-primary {
    background-color: #2563eb;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}
.gls-btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}
.gls-btn-block {
    width: 100%;
    height: calc(3rem + 2px);
    padding: 0;
    font-size: 1.05rem;
}

/* Loader */
.gls-loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 20px;
    height: 20px;
    animation: gls-spin 1s linear infinite;
    margin-left: 10px;
}
@keyframes gls-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 5. Sidebar / Image */
.gls-campaign-sidebar {
    position: sticky;
    top: 40px;
}
.gls-campaign-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 6. Expired State */
.gls-campaign-expired-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.gls-campaign-expired-card {
    background: #fff;
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
.gls-campaign-expired-card .gls-icon-wrapper {
    color: #64748b;
    margin-bottom: 20px;
}
.gls-campaign-expired-card .gls-icon-wrapper svg {
    width: 64px;
    height: 64px;
}
.gls-campaign-expired-card h2 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 15px;
}
.gls-campaign-expired-card p {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 7. Popup Modal & Floating Alert (Injected Globally) */
.gls-hidden {
    display: none !important;
}

/* Floating Alert */
.gls-campaign-alert {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99990;
    animation: gls-slide-up 0.4s ease-out forwards;
}
.gls-campaign-alert-inner {
    background: #ffffff;
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-width: 400px;
}
.gls-campaign-alert-icon {
    color: #2563eb;
    display: flex;
    align-items: center;
}
.gls-campaign-alert-icon svg {
    width: 24px;
    height: 24px;
}
.gls-campaign-alert-content a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}
.gls-campaign-alert-content a:hover {
    color: #2563eb;
}
.gls-campaign-alert-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.gls-campaign-alert-close:hover {
    color: #ef4444;
}
.gls-campaign-alert-close svg {
    width: 18px;
    height: 18px;
}

@keyframes gls-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Popup (Feature Removed to prevent bloat) */

/* Mobile Adjustments */
@media (max-width: 768px) {
    .gls-campaign-wrapper {
        padding: 30px 15px;
    }
    .gls-campaign-content h1 {
        font-size: 2rem;
    }
    .gls-campaign-form-card {
        padding: 15px;
    }
    .gls-campaign-alert {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    .gls-campaign-alert-inner {
        max-width: 100%;
    }
    .gls-campaign-close-btn {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
    }
}
