/**
 * Gutenberg Blocks Frontend Styles
 */

/* Gate Widget Container */
.gc-gate-widget.gc-gutenberg-block {
    margin: 20px 0;
}

/* Gate Form - Gutenberg specific */
.wp-block-gated-content-gate-form .gc-gate-form,
.wp-block-gated-content-protected-content .gc-gate-form,
.wp-block-gated-content-password-gate .gc-gate-form,
.wp-block-gated-content-login-gate .gc-gate-form,
.wp-block-gated-content-role-gate .gc-gate-form,
.wp-block-gated-content-woocommerce-gate .gc-gate-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Revealed Content */
.wp-block-gated-content-gate-form .gc-revealed-content,
.wp-block-gated-content-protected-content .gc-revealed-content,
.wp-block-gated-content-password-gate .gc-revealed-content,
.wp-block-gated-content-login-gate .gc-revealed-content,
.wp-block-gated-content-role-gate .gc-revealed-content,
.wp-block-gated-content-woocommerce-gate .gc-revealed-content {
    padding: 20px;
}

/* Title */
.wp-block-gated-content-gate-form .gc-gate-title,
.wp-block-gated-content-protected-content .gc-gate-title,
.wp-block-gated-content-password-gate .gc-gate-title,
.wp-block-gated-content-login-gate .gc-gate-title,
.wp-block-gated-content-role-gate .gc-gate-title,
.wp-block-gated-content-woocommerce-gate .gc-gate-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: #1e3a5f;
}

/* Description */
.wp-block-gated-content-gate-form .gc-gate-description,
.wp-block-gated-content-protected-content .gc-gate-description,
.wp-block-gated-content-password-gate .gc-gate-description,
.wp-block-gated-content-login-gate .gc-gate-description,
.wp-block-gated-content-role-gate .gc-gate-description,
.wp-block-gated-content-woocommerce-gate .gc-gate-description {
    margin: 0 0 20px;
    color: #6c757d;
    font-size: 14px;
}

/* Form Fields */
.wp-block-gated-content-gate-form .gc-form-field,
.wp-block-gated-content-protected-content .gc-form-field,
.wp-block-gated-content-password-gate .gc-form-field,
.wp-block-gated-content-login-gate .gc-form-field,
.wp-block-gated-content-role-gate .gc-form-field,
.wp-block-gated-content-woocommerce-gate .gc-form-field {
    margin-bottom: 15px;
    text-align: left;
}

.wp-block-gated-content-gate-form .gc-form-field label,
.wp-block-gated-content-protected-content .gc-form-field label,
.wp-block-gated-content-password-gate .gc-form-field label,
.wp-block-gated-content-login-gate .gc-form-field label,
.wp-block-gated-content-role-gate .gc-form-field label,
.wp-block-gated-content-woocommerce-gate .gc-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.wp-block-gated-content-gate-form .gc-form-field input,
.wp-block-gated-content-protected-content .gc-form-field input,
.wp-block-gated-content-password-gate .gc-form-field input,
.wp-block-gated-content-login-gate .gc-form-field input,
.wp-block-gated-content-role-gate .gc-form-field input,
.wp-block-gated-content-woocommerce-gate .gc-form-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wp-block-gated-content-gate-form .gc-form-field input:focus,
.wp-block-gated-content-protected-content .gc-form-field input:focus,
.wp-block-gated-content-password-gate .gc-form-field input:focus,
.wp-block-gated-content-login-gate .gc-form-field input:focus,
.wp-block-gated-content-role-gate .gc-form-field input:focus,
.wp-block-gated-content-woocommerce-gate .gc-form-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Submit Button */
.wp-block-gated-content-gate-form .gc-submit-btn,
.wp-block-gated-content-protected-content .gc-submit-btn,
.wp-block-gated-content-password-gate .gc-submit-btn,
.wp-block-gated-content-login-gate .gc-submit-btn,
.wp-block-gated-content-role-gate .gc-submit-btn,
.wp-block-gated-content-woocommerce-gate .gc-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wp-block-gated-content-gate-form .gc-submit-btn:hover,
.wp-block-gated-content-protected-content .gc-submit-btn:hover,
.wp-block-gated-content-password-gate .gc-submit-btn:hover,
.wp-block-gated-content-login-gate .gc-submit-btn:hover,
.wp-block-gated-content-role-gate .gc-submit-btn:hover,
.wp-block-gated-content-woocommerce-gate .gc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Password Hint */
.wp-block-gated-content-gate-form .gc-hint,
.wp-block-gated-content-password-gate .gc-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Messages */
.wp-block-gated-content-gate-form .gc-form-message,
.wp-block-gated-content-protected-content .gc-form-message,
.wp-block-gated-content-password-gate .gc-form-message,
.wp-block-gated-content-login-gate .gc-form-message,
.wp-block-gated-content-role-gate .gc-form-message,
.wp-block-gated-content-woocommerce-gate .gc-form-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.gc-form-message.gc-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gc-form-message.gc-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Register Link */
.wp-block-gated-content-login-gate .gc-register-link {
    margin-top: 15px;
    font-size: 14px;
    color: #6c757d;
}

.wp-block-gated-content-login-gate .gc-register-link a {
    color: #667eea;
    text-decoration: none;
}

.wp-block-gated-content-login-gate .gc-register-link a:hover {
    text-decoration: underline;
}

/* WooCommerce Products List */
.wp-block-gated-content-woocommerce-gate .gc-required-products {
    margin: 20px 0;
    text-align: left;
}

.wp-block-gated-content-woocommerce-gate .gc-product-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.wp-block-gated-content-woocommerce-gate .gc-product-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 8px;
}

.wp-block-gated-content-woocommerce-gate .gc-product-list li a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.wp-block-gated-content-woocommerce-gate .gc-product-list li a:hover {
    text-decoration: underline;
}

.wp-block-gated-content-woocommerce-gate .gc-product-price {
    font-weight: 600;
    color: #28a745;
}

/* Access Denied */
.gc-access-denied {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    color: #856404;
}

/* Login Button */
.gc-login-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.gc-login-btn:hover {
    background: #5a6fd6;
    color: #fff;
}

/* SMS Verification */
.gc-sms-verification {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.gc-send-sms-btn {
    margin-top: 8px;
    padding: 8px 15px;
    background: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.gc-send-sms-btn:hover {
    background: #138496;
}

/* Alignment */
.wp-block-gated-content-gate-form.alignwide,
.wp-block-gated-content-protected-content.alignwide,
.wp-block-gated-content-password-gate.alignwide,
.wp-block-gated-content-login-gate.alignwide,
.wp-block-gated-content-role-gate.alignwide,
.wp-block-gated-content-woocommerce-gate.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-gated-content-gate-form.alignfull,
.wp-block-gated-content-protected-content.alignfull,
.wp-block-gated-content-password-gate.alignfull,
.wp-block-gated-content-login-gate.alignfull,
.wp-block-gated-content-role-gate.alignfull,
.wp-block-gated-content-woocommerce-gate.alignfull {
    width: 100%;
    max-width: none;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wp-block-gated-content-gate-form .gc-gate-form,
    .wp-block-gated-content-protected-content .gc-gate-form,
    .wp-block-gated-content-password-gate .gc-gate-form,
    .wp-block-gated-content-login-gate .gc-gate-form,
    .wp-block-gated-content-role-gate .gc-gate-form,
    .wp-block-gated-content-woocommerce-gate .gc-gate-form {
        background: #2d3748;
        color: #e2e8f0;
    }

    .wp-block-gated-content-gate-form .gc-gate-title,
    .wp-block-gated-content-protected-content .gc-gate-title,
    .wp-block-gated-content-password-gate .gc-gate-title,
    .wp-block-gated-content-login-gate .gc-gate-title,
    .wp-block-gated-content-role-gate .gc-gate-title,
    .wp-block-gated-content-woocommerce-gate .gc-gate-title {
        color: #e2e8f0;
    }

    .wp-block-gated-content-gate-form .gc-form-field input,
    .wp-block-gated-content-protected-content .gc-form-field input,
    .wp-block-gated-content-password-gate .gc-form-field input,
    .wp-block-gated-content-login-gate .gc-form-field input,
    .wp-block-gated-content-role-gate .gc-form-field input,
    .wp-block-gated-content-woocommerce-gate .gc-form-field input {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wp-block-gated-content-gate-form .gc-gate-form,
    .wp-block-gated-content-protected-content .gc-gate-form,
    .wp-block-gated-content-password-gate .gc-gate-form,
    .wp-block-gated-content-login-gate .gc-gate-form,
    .wp-block-gated-content-role-gate .gc-gate-form,
    .wp-block-gated-content-woocommerce-gate .gc-gate-form {
        padding: 20px;
        margin: 0 15px;
    }

    .wp-block-gated-content-gate-form .gc-gate-title,
    .wp-block-gated-content-protected-content .gc-gate-title,
    .wp-block-gated-content-password-gate .gc-gate-title,
    .wp-block-gated-content-login-gate .gc-gate-title,
    .wp-block-gated-content-role-gate .gc-gate-title,
    .wp-block-gated-content-woocommerce-gate .gc-gate-title {
        font-size: 20px;
    }
}
