/* Site Management Module Styles */

.site-management-module {
    padding: 0;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.site-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.site-domain {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    word-break: break-word;
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.info-label {
    color: var(--secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Selected site card */
.card-selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .site-actions {
        flex-direction: column;
    }
    
    .site-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Add Site Card */
.add-site-card {
    border: 2px dashed var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-site-card:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.add-site-content {
    text-align: center;
}

.add-site-content h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

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

.modal {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modal {
        background: #1a1a1a;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #666666;
    transition: color 0.2s ease;
    border-radius: 0.25rem;
}

.btn-close:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .btn-close {
        color: #999999;
    }
    
    .btn-close:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .form-control {
        background: #2a2a2a;
        color: #ffffff;
        border-color: #404040;
    }
    
    .form-control:focus {
        border-color: #3b82f6;
    }
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary);
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    display: flex;
    gap: 0.75rem;
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: rgb(217, 119, 6);
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1100;
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-color: rgb(34, 197, 94);
    color: rgb(34, 197, 94);
}

.notification-error {
    border-color: rgb(239, 68, 68);
    color: rgb(239, 68, 68);
}

/* Loading animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Utility classes */
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }