/**
 * Child Name Servers Tab Styles
 */

.childname-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.childname-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e1e1;
}

.childname-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.childname-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Form Sections */
.form-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

/* Child Nameserver List */
.childname-list {
    min-height: 60px;
}

.no-childnames {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
}

.childname-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.childname-item:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.childname-info {
    flex: 1;
}

.childname-hostname {
    font-size: 16px;
    margin-bottom: 5px;
}

.childname-hostname strong {
    color: #0073aa;
}

.childname-ip {
    font-size: 14px;
    color: #666;
}

.childname-actions {
    flex-shrink: 0;
}

/* Add Form */
.childname-add-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.form-control.valid {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-control.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.field-validation {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
}

.field-validation.success {
    color: #28a745;
}

.field-validation.error {
    color: #dc3545;
}

.form-actions {
    text-align: right;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #0073aa;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #005a87;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Edit Mode Styling */
.childname-actions .btn {
    margin-left: 5px;
}

.childname-actions .btn:first-child {
    margin-left: 0;
}

.form-actions .btn {
    margin-left: 10px;
}

.form-actions .btn:first-child {
    margin-left: 0;
}

/* Edit Mode Form Styling */
.form-section.edit-mode {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.form-section.edit-mode h4 {
    color: #0073aa;
}

/* Status Messages */
.status-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 500;
}

.status-loading {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Domain Information */
.domain-info-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.domain-info-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.info-item label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.info-item span {
    color: #666;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .childname-container {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .childname-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .childname-actions {
        align-self: flex-end;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}