/* ==========================================
   SiteRooster Notifications Section
   Card-based design - Add to site-detail.css
   ========================================== */

/* Section Container */
.sr-notifications-section {
    padding: 0;
    background:none !important;
}

/* Header */
.sr-notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sr-notifications-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin: 0;
}

/* Upgrade Prompt */
.sr-notification-upgrade-prompt {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    margin-bottom: 24px;
}

.sr-notification-upgrade-prompt .upgrade-prompt-icon {
    font-size: 32px;
    line-height: 1;
}

.sr-notification-upgrade-prompt .upgrade-prompt-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin: 0 0 8px 0;
}

.sr-notification-upgrade-prompt .upgrade-prompt-content p {
    font-size: 14px;
    color: var(--gray-600, #4b5563);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* ==========================================
   Alert Cards
   ========================================== */
.sr-alert-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sr-alert-card {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.sr-alert-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Alert Header */
.sr-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.sr-alert-info {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

/* Alert Icon */
.sr-alert-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100, #f3f4f6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sr-alert-icon.orange {
    background: var(--siterooster-light, #fff7f5);
}

.sr-alert-icon.green {
    background: #ecfdf5;
}

.sr-alert-icon.blue {
    background: #eff6ff;
}

.sr-alert-icon.purple {
    background: #faf5ff;
}

/* Alert Text */
.sr-alert-text {
    flex: 1;
    min-width: 0;
}

.sr-alert-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin: 0 0 4px 0;
}

.sr-alert-text p {
    font-size: 13px;
    color: var(--gray-500, #6b7280);
    margin: 0;
}

/* ==========================================
   Channel Buttons
   ========================================== */
.sr-channel-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.sr-channel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600, #4b5563);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.sr-channel-btn:hover:not(.locked):not(.needs-setup) {
    border-color: var(--gray-300, #d1d5db);
    background: var(--gray-50, #f9fafb);
}

.sr-channel-btn.active {
    background: #ecfdf5;
    border-color: #10b981;
    color: #166534;
}

.sr-channel-icon {
    font-size: 14px;
}

.sr-channel-label {
    font-weight: 500;
}

.sr-channel-check {
    display: none;
    margin-left: 2px;
    font-weight: 700;
}

.sr-channel-btn.active .sr-channel-check {
    display: inline;
}

.sr-channel-lock {
    display: none;
    margin-left: 2px;
    font-size: 11px;
}

.sr-channel-btn.locked {
    opacity: 0.5;
    cursor: pointer;
}

.sr-channel-btn.locked:hover {
    opacity: 0.7;
}

.sr-channel-btn.locked .sr-channel-lock {
    display: inline;
}

.sr-channel-btn.needs-setup {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   Alert Settings
   ========================================== */
.sr-alert-settings {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.sr-setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sr-setting-item label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-setting-item select {
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 16px;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-700, #374151);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sr-setting-item select:hover {
    border-color: var(--gray-300, #d1d5db);
}

.sr-setting-item select:focus {
    outline: none;
    border-color: var(--siterooster-green, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Alert Info Text (for redirect card) */
.sr-alert-info-text {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--gray-50, #f9fafb);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-600, #4b5563);
    margin-top: 16px;
    line-height: 1.5;
}

.sr-alert-info-text .info-icon {
    color: var(--gray-400, #9ca3af);
    flex-shrink: 0;
    font-size: 16px;
}

/* ==========================================
   Notification Channels Section
   ========================================== */
.sr-channels-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200, #e5e7eb);
}

.sr-channels-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900, #111827);
    margin: 0 0 16px 0;
}

/* Channels Grid */
.sr-channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Channel Card */
.sr-channel-card {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
}

.sr-channel-card.locked {
    opacity: 0.6;
    cursor: pointer;
}

.sr-channel-card.locked:hover {
    opacity: 0.8;
}

.sr-channel-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sr-channel-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sr-channel-card-icon.blue {
    background: #dbeafe;
}

.sr-channel-card-icon.purple {
    background: #f3e8ff;
}

.sr-channel-card-icon.orange {
    background: rgba(5, 150, 105, 0.12);
}

.sr-channel-card-info {
    flex: 1;
    min-width: 0;
}

.sr-channel-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900, #111827);
}

.sr-channel-card-detail {
    font-size: 12px;
    color: var(--gray-500, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-channel-status {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    background: var(--gray-200, #e5e7eb);
    color: var(--gray-600, #4b5563);
    flex-shrink: 0;
}

.sr-channel-status.active {
    background: #ecfdf5;
    color: #166534;
}

.sr-channel-lock-badge {
    font-size: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Channel Form */
.sr-channel-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.sr-phone-input-group,
.sr-webhook-input-group,
.sr-verification-code-input {
    display: flex;
    gap: 8px;
}

.sr-channel-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-700, #374151);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sr-channel-input:focus {
    outline: none;
    border-color: var(--siterooster-green, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.sr-channel-input::placeholder {
    color: var(--gray-400, #9ca3af);
}

.sr-channel-input.sr-mono {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
}

.sr-channel-input.sr-code-input {
    max-width: 120px;
    text-align: center;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    letter-spacing: 4px;
}

/* Buttons */
.sr-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.sr-btn-dark {
    background: var(--gray-900, #111827);
    color: #fff;
}

.sr-btn-dark:hover {
    background: var(--gray-700, #374151);
}

.sr-btn-primary {
    background: var(--siterooster-green, #059669);
    color: #fff;
}

.sr-btn-primary:hover {
    background: #e55a3a;
}

.sr-btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--gray-500, #6b7280);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.sr-btn-link:hover {
    text-decoration: underline;
}

.sr-btn-link.sr-text-red {
    color: #ef4444;
}

/* Verification Group */
.sr-verification-group {
    margin-top: 12px;
}

.sr-verification-text {
    font-size: 13px;
    color: var(--gray-600, #4b5563);
    margin: 0 0 12px 0;
}

.sr-verification-group .sr-verification-code-input {
    margin-bottom: 8px;
}

/* Verified Phone Group */
.sr-verified-phone-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sr-verified-phone-number {
    font-size: 14px;
    color: var(--gray-700, #374151);
}

/* SMS Usage */
.sr-sms-usage {
    margin-top: 12px;
}

.sr-sms-usage-bar {
    height: 4px;
    background: var(--gray-200, #e5e7eb);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.sr-sms-usage-fill {
    height: 100%;
    background: var(--siterooster-green, #059669);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sr-sms-usage-text {
    font-size: 11px;
    color: var(--gray-500, #6b7280);
}

/* Channel Help */
.sr-channel-help {
    margin-top: 10px;
}

.sr-channel-help a {
    font-size: 12px;
    color: var(--siterooster-green, #059669);
    text-decoration: none;
}

.sr-channel-help a:hover {
    text-decoration: underline;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .sr-channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sr-alert-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .sr-channel-buttons {
        width: 100%;
    }
    
    .sr-alert-settings {
        flex-direction: column;
        gap: 16px;
    }
    
    .sr-setting-item {
        width: 100%;
    }
    
    .sr-setting-item select {
        width: 100%;
    }
    
    .sr-channels-grid {
        grid-template-columns: 1fr;
    }
    
    .sr-notifications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}