/* Site Alert Manager - Frontend Styles */

/* Alert Display Shortcode */
.sam-alert-display {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
    text-align: center;
    animation: sam-pulse 2s ease-in-out infinite;
}

.sam-alert-display a {
    color: #ffffff;
    text-decoration: underline;
}

@keyframes sam-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(238, 90, 36, 0.5); }
}

/* Admin Container */
.sam-admin-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Login Box */
.sam-login-box {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.sam-login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

/* Form Styles */
.sam-form-group {
    margin-bottom: 20px;
}

.sam-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sam-form-group input[type="text"],
.sam-form-group input[type="password"],
.sam-form-group textarea,
.sam-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.sam-form-group input:focus,
.sam-form-group textarea:focus,
.sam-form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sam-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* HTML Editor Styles */
.sam-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    align-items: center;
}

.sam-editor-btn {
    padding: 6px 12px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 36px;
}

.sam-editor-btn:hover {
    background: #555;
    border-color: #666;
}

.sam-editor-btn:active {
    background: #666;
}

.sam-toolbar-separator {
    width: 1px;
    height: 24px;
    background: #444;
    margin: 0 5px;
}

.sam-color-picker {
    padding: 6px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #333;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.sam-color-picker option {
    background: #333;
    color: #fff;
}

.sam-editor {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-top: 1px solid #e1e5e9;
    border-radius: 0 0 8px 8px;
    background: #fff;
    font-size: 15px;
    line-height: 1.6;
}

.sam-editor:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sam-editor:empty:before {
    content: attr(placeholder);
    color: #999;
    pointer-events: none;
}

.sam-editor p {
    margin: 0 0 10px 0;
}

.sam-editor ul, .sam-editor ol {
    margin: 0 0 10px 20px;
    padding: 0;
}

.sam-editor a {
    color: #3498db;
    text-decoration: underline;
}

/* Buttons */
.sam-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sam-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
}

.sam-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1c5a85 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.sam-btn-secondary {
    background: #f0f3f5;
    color: #333;
}

.sam-btn-secondary:hover {
    background: #e1e5e9;
}

.sam-btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
}

.sam-btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #96281b 100%);
}

/* Error & Message */
.sam-error {
    background: #fee;
    color: #c0392b;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #e74c3c;
}

.sam-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.sam-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.sam-message.error {
    background: #fee;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

/* Admin Header */
.sam-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.sam-admin-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.sam-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sam-logged-as {
    color: #666;
    font-size: 14px;
}

.sam-logged-as strong {
    color: #333;
}

/* Create Alert Section */
.sam-create-alert {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.sam-create-alert h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
}

.sam-char-count {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

#sam-char-current {
    font-weight: 600;
}

/* Alerts List */
.sam-alerts-list {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.sam-alerts-list h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
}

.sam-no-alerts {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* Alerts Table */
.sam-alerts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sam-alerts-table th,
.sam-alerts-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.sam-alerts-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.sam-alerts-table tr:hover {
    background: #f8f9fa;
}

.sam-alert-message {
    max-width: 300px;
    word-wrap: break-word;
}

.sam-created-by {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sam-author {
    font-weight: 600;
    color: #333;
}

.sam-created-date {
    font-size: 12px;
    color: #888;
}

/* Status Badges */
.sam-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sam-status-live {
    background: #28a745;
    color: #ffffff;
    animation: sam-blink 1.5s ease-in-out infinite;
}

@keyframes sam-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.sam-status-expired {
    background: #6c757d;
    color: #ffffff;
}

.sam-status-scheduled {
    background: #ffc107;
    color: #333;
}

/* Row Styles */
.sam-alert-live {
    background: rgba(40, 167, 69, 0.05) !important;
}

.sam-alert-expired {
    opacity: 0.6;
}

/* Shortcode Info */
.sam-shortcode-info {
    background: #e8f4fd;
    padding: 20px 30px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.sam-shortcode-info h3 {
    margin-top: 0;
    color: #2980b9;
}

.sam-shortcode-info code {
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .sam-admin-container {
        padding: 15px;
    }
    
    .sam-admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .sam-alerts-table {
        font-size: 12px;
    }
    
    .sam-alerts-table th,
    .sam-alerts-table td {
        padding: 10px 8px;
    }
    
    .sam-alert-message {
        max-width: 150px;
    }
}
