/**
 * Element Bits Admin Styles
 */

/* Widget Module Cards */
.elebits-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.elebits-module-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.elebits-module-card:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.elebits-module-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.elebits-module-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #555;
}

.elebits-module-title {
    flex: 1;
}

.elebits-module-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.elebits-module-description {
    padding: 15px;
    color: #666;
}

.elebits-module-description p {
    margin: 0;
    font-size: 13px;
}

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

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

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

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

input:checked + .elebits-slider {
    background-color: #2271b1;
}

input:focus + .elebits-slider {
    box-shadow: 0 0 1px #2271b1;
}

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

/* API Key Input Styling */
.elebits-module-api-key {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.elebits-api-key-desc {
    margin-bottom: 10px;
    font-size: 13px;
}

.elebits-api-key-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Form Styling */
.elebits-modules-form {
    margin-top: 20px;
}

.element-bits-widgets h2 {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .elebits-modules-grid {
        grid-template-columns: 1fr;
    }
}
