/* Custom Domains Page Styles */
.custom-domains-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.header-content h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.header-content h1 i {
    color: #3498db;
    margin-right: 0.5rem;
}

.header-subtitle {
    color: #6c757d;
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.loading-container p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.empty-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Domains Grid */
.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.domain-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.domain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

/* Domain Status Classes */
.domain-card.domain-active::before { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.domain-card.domain-verified::before { background: linear-gradient(90deg, #3498db, #2980b9); }
.domain-card.domain-ssl::before { background: linear-gradient(90deg, #f39c12, #e67e22); }
.domain-card.domain-pending::before { background: linear-gradient(90deg, #f39c12, #e67e22); }
.domain-card.domain-verifying::before { background: linear-gradient(90deg, #9b59b6, #8e44ad); }
.domain-card.domain-failed::before { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.domain-card.domain-error::before { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.domain-card.domain-expired::before { background: linear-gradient(90deg, #95a5a6, #7f8c8d); }

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.domain-info {
    flex: 1;
}

.domain-name {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.domain-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.success { background: #d4edda; color: #155724; }
.status-badge.warning { background: #fff3cd; color: #856404; }
.status-badge.info { background: #d1ecf1; color: #0c5460; }
.status-badge.danger { background: #f8d7da; color: #721c24; }
.status-badge.secondary { background: #e2e3e5; color: #383d41; }

.ssl-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.domain-actions {
    display: flex;
    gap: 0.5rem;
}

.domain-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Domain Details */
.domain-details {
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Domain Error */
.domain-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.domain-error i {
    color: #dc3545;
}

/* Domain Health */
.domain-health {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.domain-health .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content.large-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.modal-header h3 i {
    color: #3498db;
    margin-right: 0.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Tab Navigation */
.domain-management-tabs {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tab-navigation {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: #3498db;
    background: #f8f9fa;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

.tab-button i {
    font-size: 1rem;
}

.tab-content {
    flex: 1;
}

/* Overview Section */
.overview-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.status-overview h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.status-label {
    color: #6c757d;
    font-weight: 500;
}

.status-value {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-value.success { background: #d4edda; color: #155724; }
.status-value.warning { background: #fff3cd; color: #856404; }

.domain-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.domain-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

/* DNS Section */
.dns-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.dns-section p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.dns-records-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dns-records-table table {
    width: 100%;
    margin: 0;
}

.dns-records-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.dns-records-table td {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.record-type {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.record-value {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.empty-dns {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* SSL Section */
.ssl-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.ssl-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.ssl-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.ssl-status.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.ssl-status i {
    font-size: 2rem;
}

.ssl-status.success i { color: #28a745; }
.ssl-status.warning i { color: #ffc107; }

.ssl-info h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-weight: 600;
}

.ssl-info p {
    margin: 0 0 1rem 0;
    color: #6c757d;
}

.ssl-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.ssl-actions {
    display: flex;
    gap: 1rem;
}

/* Health Section */
.health-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.health-status {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.health-status.healthy {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.health-status.unhealthy {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.health-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.health-header i {
    font-size: 1.5rem;
}

.health-status.healthy .health-header i { color: #28a745; }
.health-status.unhealthy .health-header i { color: #dc3545; }

.health-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.health-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
}

.metric-label {
    color: #6c757d;
    font-weight: 500;
}

.metric-value {
    color: #2c3e50;
    font-weight: 600;
}

.health-issues h6 {
    color: #dc3545;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.health-issues ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #721c24;
}

.health-issues li {
    margin-bottom: 0.25rem;
}

.health-placeholder {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-domains-container {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .domain-actions {
        justify-content: flex-start;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-actions {
        flex-direction: column;
    }
    
    .ssl-actions {
        flex-direction: column;
    }
    
    .health-metrics {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.domain-card {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.tab-content > div {
    animation: slideIn 0.3s ease-out;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Loading Spinner */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Focus States */
.btn:focus,
.form-control:focus,
.tab-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 