/* Custom Toggle Switch Component - Reusable across the application */

.custom-toggle-container {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.custom-toggle-info {
    flex: 1;
    margin-right: 20px;
}

.custom-toggle-info h5 {
    margin-bottom: 5px;
    color: var(--tenant-primary, #582156);
    font-weight: 600;
}

[data-theme="dark"] .custom-toggle-info h5 {
    color: #fff;
}

.custom-toggle-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

[data-theme="dark"] .custom-toggle-info p {
    color: #a8a8a8;
}

/* Custom Toggle Switch */
.custom-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.custom-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    border: 2px solid #ddd;
}

.custom-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.custom-toggle-switch input:checked + .custom-toggle-slider {
    background-color: var(--tenant-primary, #582156);
    border-color: var(--tenant-primary, #582156);
}

.custom-toggle-switch input:checked + .custom-toggle-slider:before {
    transform: translateX(26px);
}

.custom-toggle-switch:hover .custom-toggle-slider {
    box-shadow: 0 0 8px rgba(88, 33, 86, 0.3);
}

/* Disabled state */
.custom-toggle-switch input:disabled + .custom-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-toggle-switch input:disabled + .custom-toggle-slider:before {
    cursor: not-allowed;
}

/* Size variations */
.custom-toggle-switch.small {
    width: 50px;
    height: 28px;
}

.custom-toggle-switch.small .custom-toggle-slider:before {
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
}

.custom-toggle-switch.small input:checked + .custom-toggle-slider:before {
    transform: translateX(22px);
}

.custom-toggle-switch.large {
    width: 70px;
    height: 40px;
}

.custom-toggle-switch.large .custom-toggle-slider:before {
    height: 32px;
    width: 32px;
    left: 2px;
    bottom: 2px;
}

.custom-toggle-switch.large input:checked + .custom-toggle-slider:before {
    transform: translateX(30px);
}

/* Color variations */
.custom-toggle-switch.success input:checked + .custom-toggle-slider {
    background-color: #28a745;
    border-color: #28a745;
}

.custom-toggle-switch.warning input:checked + .custom-toggle-slider {
    background-color: #ffc107;
    border-color: #ffc107;
}

.custom-toggle-switch.danger input:checked + .custom-toggle-slider {
    background-color: #dc3545;
    border-color: #dc3545;
}

.custom-toggle-switch.info input:checked + .custom-toggle-slider {
    background-color: #17a2b8;
    border-color: #17a2b8;
}
