/* Customer Portal Settings - Scoped Styles */
/* All styles scoped to .customer-portal-settings to prevent global conflicts */

/* QR code container styling - scoped to prevent conflicts if ID is reused */
.customer-portal-settings #qrcode {
    display: inline-block;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
}

.customer-portal-settings #qrcode canvas,
.customer-portal-settings #qrcode img {
    display: block;
    margin: 0 auto;
}

/* Mobile-first approach - scoped to customer portal settings */
@media (max-width: 767px) {
    /* QR code container responsive */
    .customer-portal-settings #qrcode {
        max-width: 100%;
        overflow: hidden;
    }

    .customer-portal-settings #qrcode canvas,
    .customer-portal-settings #qrcode img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Page-specific adjustments for customer portal settings */
    .customer-portal-settings .card {
        margin-bottom: 1rem !important;
    }

    .customer-portal-settings .btn-group-sm {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .customer-portal-settings .btn-group-sm .btn {
        margin-bottom: 0.25rem;
        border-radius: 0.25rem !important;
    }

    .customer-portal-settings .card-header {
        padding: 0.75rem 1rem;
    }

    .customer-portal-settings .card-header h5 {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .customer-portal-settings .card-header .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tablet adjustments - scoped to customer portal settings */
@media (min-width: 768px) and (max-width: 991px) {
    .customer-portal-settings .col-md-4,
    .customer-portal-settings .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Stack columns on tablet within customer portal settings */
    .customer-portal-settings .row > [class*='col-md-'] {
        margin-bottom: 1rem;
    }
}

/* Desktop optimizations - scoped */
@media (min-width: 992px) {
    .customer-portal-settings .card {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
}

/* Touch-friendly button sizing - scoped */
.customer-portal-settings .btn-group .btn {
    min-height: 44px;
    min-width: 44px;
}

/* Status badge improvements - scoped */
.customer-portal-settings .badge {
    font-size: 0.85em;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Better monospace font for DNS records - scoped */
.customer-portal-settings .font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* Improved loading states - scoped */
.customer-portal-settings .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Smooth transitions - scoped */
.customer-portal-settings .alert,
.customer-portal-settings .card,
.customer-portal-settings .btn,
.customer-portal-settings .badge {
    transition: all 0.2s ease-in-out;
}

/* Print styles - scoped */
@media print {
    .customer-portal-settings .btn,
    .customer-portal-settings .btn-group,
    .customer-portal-settings .card-header .btn {
        display: none !important;
    }

    .customer-portal-settings .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    #qrcode {
        display: block;
        text-align: center;
    }
}

/* Accessibility improvements - scoped */
.customer-portal-settings .btn:focus,
.customer-portal-settings .form-control:focus,
.customer-portal-settings .btn-close:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Animation for success/error messages - scoped */
@keyframes slideInPortalSettings {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.customer-portal-settings .alert {
    animation: slideInPortalSettings 0.3s ease-out;
}

/* Enhanced card headers - scoped */
.customer-portal-settings .card-header.bg-primary,
.customer-portal-settings .card-header.bg-info,
.customer-portal-settings .card-header.bg-secondary {
    padding: 1rem;
}

.customer-portal-settings .card-header h5 {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.customer-portal-settings .card-header h5 i {
    margin-right: 0.5rem;
}

/* Better empty state styling - scoped */
.customer-portal-settings .text-center.py-4 {
    padding: 2rem 1rem;
}

.customer-portal-settings .text-center.py-4 i.fa-3x {
    opacity: 0.5;
}
