/* Google Hotels & iCalendar Styles */

/* ==================== Switch Toggle ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #5cb85c;
}

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

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ==================== Status Labels ==================== */
.label-active {
    background-color: #5cb85c;
}

.label-error {
    background-color: #d9534f;
}

.label-pending {
    background-color: #f0ad4e;
}

.label-disabled {
    background-color: #777;
}

/* ==================== Feed Cards ==================== */
.feed-item {
    margin-bottom: 20px;
}

.feed-item .panel {
    transition: box-shadow 0.3s;
}

.feed-item .panel:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ==================== QR Code Container ==================== */
#qrcode {
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#qrcode canvas,
#qrcode img {
    margin: 0 auto;
}

/* ==================== Responsive Tables ==================== */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }
    
    .btn-group-justified .btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* ==================== Loading Spinner ==================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ==================== Panel Headers ==================== */
.panel-heading .btn {
    margin-top: -3px;
}

.panel-heading .switch {
    margin-top: -2px;
}

/* ==================== Help Sections ==================== */
.help-block {
    color: #737373;
    font-size: 12px;
    margin-top: 5px;
}

/* ==================== Alerts ==================== */
.alert {
    border-radius: 4px;
}

.alert i {
    margin-right: 5px;
}

/* ==================== Buttons ==================== */
.btn-group-justified .btn {
    float: none;
}

.btn-group-justified .btn i {
    margin-right: 3px;
}

/* ==================== Modal Improvements ==================== */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-header .close {
    margin-top: -2px;
}

/* ==================== Status Indicators ==================== */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.active,
.status-indicator--active {
    background-color: #5cb85c;
}

.status-indicator.error,
.status-indicator--inactive {
    background-color: #d9534f;
}

.status-indicator.pending {
    background-color: #f0ad4e;
}

/* ==================== Tooltips ==================== */
[tooltip] {
    cursor: help;
}

/* ==================== Page Header ==================== */
.page-header {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.page-header h1 {
    margin-top: 0;
}

.page-header .text-muted {
    margin-bottom: 10px;
}

/* ==================== Tabs ==================== */
.nav-tabs {
    margin-bottom: 20px;
}

.nav-tabs > li > a {
    cursor: pointer;
}

.nav-tabs .badge {
    margin-left: 5px;
}

/* ==================== Input Groups ==================== */
.input-group-btn .btn {
    border-left: 0;
}

/* ==================== Well ==================== */
.well {
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    padding: 10px;
}

.well-sm {
    padding: 9px;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fadeIn 0.3s ease-in-out;
}

/* ==================== Print Styles ==================== */
@media print {
    .btn,
    .panel-heading .switch,
    .modal-footer {
        display: none;
    }
}

/* ==================== Custom Scrollbar ==================== */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
