/**
 * Independent DNS Manager Styles
 * Cloudflare-inspired DNS interface
 */

/* DNS Manager Wrapper */
.dns-manager-wrapper {
    margin-top: 20px;
}

/* DNS Setup Status */
.dns-setup-status {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.dns-setup-status h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.dns-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dns-status-indicator .status-label {
    font-weight: 600;
    color: #555;
}

.dns-status-indicator .status-value {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.dns-status-indicator .status-description {
    color: #666;
    font-size: 14px;
}

/* Add Record Section */
.dns-add-record-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.dns-add-record-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.dns-record-form .form-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.dns-record-form .form-field {
    display: flex;
    flex-direction: column;
}

.dns-record-form .form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.dns-record-form .form-field input,
.dns-record-form .form-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dns-record-form .form-field input:focus,
.dns-record-form .form-field select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

.dns-record-form .form-actions {
    display: flex;
    gap: 10px;
}

/* Field Hints */
.field-hint {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Record Type Information */
.record-type-info {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.record-type-info .info-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.record-type-info .info-content strong {
    color: #007cba;
}

.record-type-info .info-content small {
    display: block;
    margin-top: 8px;
    font-style: italic;
}

/* DNS Records Section */
.dns-records-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.dns-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dns-table-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.dns-table-controls {
    display: flex;
    gap: 10px;
}

.dns-table-container {
    overflow-x: auto;
}

.dns-records-table {
    width: 100%;
    border-collapse: collapse;
}

.dns-records-table th,
.dns-records-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dns-records-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dns-records-table tbody tr:hover {
    background: #f8f9fa;
}

.dns-records-table tbody tr:last-child td {
    border-bottom: none;
}

.dns-records-table code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.dns-records-table .no-records td {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
}

/* DNS Record Types */
.dns-record-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dns-type-a { background: #e3f2fd; color: #1976d2; }
.dns-type-aaaa { background: #f3e5f5; color: #7b1fa2; }
.dns-type-cname { background: #e8f5e8; color: #388e3c; }
.dns-type-mx { background: #fff3e0; color: #f57c00; }
.dns-type-txt { background: #fce4ec; color: #c2185b; }
.dns-type-ns { background: #e0f2f1; color: #00796b; }
.dns-type-srv { background: #f1f8e9; color: #689f38; }

/* Record Actions */
.record-actions {
    white-space: nowrap;
}

.record-actions .button {
    margin-right: 5px;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dns-record-form .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dns-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dns-table-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .dns-records-table th,
    .dns-records-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .dns-setup-status,
    .dns-add-record-section,
    .dns-records-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .dns-records-table {
        font-size: 12px;
    }
    
    .dns-records-table th,
    .dns-records-table td {
        padding: 8px 6px;
    }
    
    .record-actions .button {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Success/Error Messages */
.dns-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}

.dns-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dns-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dns-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Tab Loading State */
.tab-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.tab-loading .loading-spinner {
    margin: 0 auto 15px;
    display: block;
}