/* Common styles for wp Integration application */

body {
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

.navbar-brand img {
    height: 40px;
}

/* User Info Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.dropdown-item {
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateX(3px);
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

/* Card Styles */
.card {
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.card.border-primary {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
}

/* Form Styles */
.form-label {
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.form-check-input:indeterminate {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* Button Styles */
.btn {
    border-radius: 5px;
    padding: 0.75rem;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary {
    background-color: #007bff;
    color: white;
}

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

.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Badge Styles */
.badge {
    font-size: 0.8em;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #dc3545;
}

.saved-badge,
.synced-badge {
    z-index: 1000 !important;
    font-size: 0.75rem !important;
    font-weight: bold !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.synced-badge {
    border-radius: 20px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

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

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

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

.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #28a745;
}

input:focus+.slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.toggle-label {
    margin-left: 10px;
    font-weight: 600;
}

/* Breadcrumb Styles */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    color: white !important;
}

.breadcrumb-item a {
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #ffd700 !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #ffed4e !important;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Sandbox environment theming */
body.sandbox-environment {
    background: linear-gradient(160deg, #fff5f7 0%, #eef2ff 100%);
    min-height: 100vh;
}

body.sandbox-environment .card {
    border: 1px solid rgba(236, 72, 153, 0.18);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.12);
}

body.sandbox-environment .card-header {
    border-bottom-color: rgba(236, 72, 153, 0.25);
}

body.sandbox-environment .btn-primary {
    background-color: #ec4899;
    color: #fff;
}

body.sandbox-environment .btn-primary:not(:disabled):hover {
    background-color: #db2777;
}

body.sandbox-environment .btn-secondary {
    background-color: rgba(14, 165, 233, 0.2);
    color: #0f172a;
}

body.sandbox-environment .badge {
    box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.25);
}

body.sandbox-environment .modern-nav {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(14, 165, 233, 0.95)) !important;
}

body.sandbox-environment .modern-nav .nav-link.active,
body.sandbox-environment .modern-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.sandbox-banner {
    display: none;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.95) 0%, rgba(14, 165, 233, 0.95) 100%);
    color: #fff;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.22);
}

.sandbox-banner .environment-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

body.sandbox-environment .sandbox-banner {
    display: flex;
}