/**
 * TEC Tag Notifications - Public Styles
 *
 * @since 1.0.0
 */

/* Subscription Form Container */
.ttn-subscription-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Section Styling */
.ttn-section {
    margin-bottom: 30px;
}

.ttn-section h3 {
    margin: 0 0 10px;
    font-size: 1.25em;
    color: #1a365d;
}

.ttn-section-desc {
    margin: 0 0 15px;
    color: #666;
}

/* Select All/Deselect All Links */
.ttn-select-actions {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.ttn-select-actions a {
    color: #2563eb;
    text-decoration: none;
}

.ttn-select-actions a:hover {
    text-decoration: underline;
}

.ttn-separator {
    color: #ccc;
    margin: 0 8px;
}

/* Checkbox Grid */
.ttn-checkbox-grid {
    display: grid;
    gap: 10px;
}

.ttn-columns-1 {
    grid-template-columns: 1fr;
}

.ttn-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ttn-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ttn-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Checkbox Label */
.ttn-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ttn-checkbox-label:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.ttn-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ttn-checkbox-label input[type="checkbox"]:checked + .ttn-term-name {
    font-weight: 600;
}

.ttn-term-name {
    flex: 1;
}

.ttn-subscriber-count {
    font-size: 0.85em;
    color: #718096;
    margin-left: 5px;
}

/* Form Actions */
.ttn-form-actions {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ttn-submit-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ttn-submit-btn:hover {
    background: #1d4ed8;
}

.ttn-submit-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.ttn-form-message {
    font-weight: 500;
}

.ttn-form-message.success {
    color: #059669;
}

.ttn-form-message.error {
    color: #dc2626;
}

/* No Terms Message */
.ttn-no-terms {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* Login Required */
.ttn-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ttn-login-link {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.ttn-login-link:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Unsubscribe Page */
.ttn-unsubscribe-page {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

.ttn-message {
    padding: 30px;
    border-radius: 8px;
}

.ttn-message h2 {
    margin: 0 0 15px;
}

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

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

.ttn-message-info {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
}

.ttn-login-btn {
    display: inline-block;
    margin-top: 15px;
    background: #2563eb;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.ttn-login-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

/* Current Subscriptions Summary */
.ttn-current-subscriptions {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.ttn-current-subscriptions h3 {
    margin: 0 0 15px;
    color: #004085;
    font-size: 1.1em;
}

.ttn-subscription-summary p {
    margin: 0 0 8px;
    color: #004085;
}

.ttn-subscription-summary p:last-child {
    margin-bottom: 0;
}

.ttn-delivery-info {
    margin-top: 12px !important;
    padding-top: 12px;
    border-top: 1px solid #b8daff;
}

/* Notification Preferences Section */
.ttn-preferences {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.ttn-preference-group {
    margin-bottom: 20px;
}

.ttn-preference-group:last-child {
    margin-bottom: 0;
}

.ttn-preference-label {
    display: block;
    margin-bottom: 10px;
    color: #1a365d;
}

.ttn-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ttn-radio-label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ttn-radio-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.ttn-radio-label input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ttn-select-inline {
    margin-left: 8px;
    padding: 4px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
}

.ttn-select-inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ttn-checkbox-grid {
        grid-template-columns: 1fr !important;
    }

    .ttn-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ttn-submit-btn {
        width: 100%;
    }

    .ttn-radio-label {
        flex-wrap: wrap;
    }

    .ttn-select-inline {
        margin-left: 28px;
        margin-top: 8px;
    }
}
