/* Notification Templates Component Styles */

/* Grid Layout */
.nt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .nt-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Card Styles */
.nt-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.nt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.nt-card-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.nt-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nt-card-type {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.nt-card-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.nt-card-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.nt-card-message {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.nt-message-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nt-message-text {
    color: #1f2937;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    min-height: 4rem;
}

.nt-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nt-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nt-status-active {
    background-color: #dcfce7;
    color: #166534;
}

.nt-status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.nt-updated-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.nt-card-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
}

.nt-empty-message {
    color: #6b7280;
    margin-bottom: 1rem;
    font-style: italic;
}

.nt-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Button Styles */
.nt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    gap: 0.5rem;
}

.nt-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.nt-button-primary {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.nt-button-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.nt-button-secondary {
    background: #6b7280;
    color: white;
}

.nt-button-secondary:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-1px);
}

.nt-button-outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.nt-button-outline:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.nt-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.nt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.nt-modal {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.nt-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.nt-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nt-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.nt-modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.nt-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
    .nt-modal-actions {
        flex-direction: column-reverse;
    }
    
    .nt-modal-actions .nt-button {
        width: 100%;
        justify-content: center;
    }
}

/* Form Styles */
.nt-form-group {
    margin-bottom: 1.5rem;
}

.nt-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.nt-form-textarea,
.nt-form-select,
.nt-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.nt-form-textarea:focus,
.nt-form-select:focus,
.nt-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nt-form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.nt-form-static {
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.nt-form-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.nt-form-help {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
    font-style: italic;
}

/* Toast Notifications */
.nt-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    animation: toastSlideIn 0.3s ease-out;
}

.nt-toast-success {
    background: #10b981;
    color: white;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .nt-toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        right: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] .nt-card-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .nt-modal-actions {
    justify-content: flex-start;
}

[dir="rtl"] .nt-button {
    flex-direction: row-reverse;
}

/* Loading States */
.nt-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.nt-button.loading {
    position: relative;
}

.nt-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.nt-button:focus,
.nt-form-textarea:focus,
.nt-form-select:focus,
.nt-form-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .nt-card,
    .nt-button,
    .nt-modal,
    .nt-toast {
        transition: none;
        animation: none;
    }
}
