/* Dragwyb Click To Chat - Admin Styles */

/* Reset & Base */
* {
    box-sizing: border-box;
}

.dctc-admin-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    margin: 20px 0 20px -20px;
    padding: 0;
}

/* Header Tabs */
.dctc-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 30px;
    position: sticky;
    top: 32px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dctc-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    gap: 10px;
}

.dctc-tabs li {
    flex: 1;
    text-align: center;
}

.dctc-tab {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.dctc-tab:hover {
    color: #8e44ad;
    background: #f9fafb;
}

.dctc-tab.active {
    color: #8e44ad;
    background: #f3e8ff;
    font-weight: 600;
}

.dctc-tab.completed::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    color: #10b981;
    font-size: 12px;
}

/* Main Content Area */
.dctc-content {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Settings Panel */
.dctc-settings-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dctc-section {
    display: none;
    padding: 30px;
}

.dctc-section.active {
    display: block;
}

.dctc-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

/* Form Elements */
.dctc-form-group {
    margin-bottom: 25px;
}

.dctc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.dctc-form-group input[type="text"],
.dctc-form-group input[type="email"],
.dctc-form-group input[type="tel"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.dctc-form-group input[type="text"]:focus,
.dctc-form-group input[type="email"]:focus,
.dctc-form-group input[type="tel"]:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

/* Channel Cards */
.dctc-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dctc-channel-card {
    position: relative;
    padding: 24px 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.dctc-channel-card:hover {
    border-color: #8e44ad;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dctc-channel-card.active {
    border-color: #8e44ad;
    background: #f9fafb;
    box-shadow: 0 0 0 1px #8e44ad;
}

/* Card Switch */
.dctc-card-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 20px;
    z-index: 10;
}

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

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

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

.dctc-card-checkbox:checked+.dctc-card-slider {
    background-color: #8e44ad;
}

.dctc-card-checkbox:focus+.dctc-card-slider {
    box-shadow: 0 0 1px #8e44ad;
}

.dctc-card-checkbox:checked+.dctc-card-slider:before {
    -webkit-transform: translateX(14px);
    -ms-transform: translateX(14px);
    transform: translateX(14px);
}

.dctc-channel-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.dctc-channel-card:hover .dctc-channel-icon {
    transform: scale(1.1);
}

.dctc-channel-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dctc-channel-config {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 15px;
}

/* Toggle Switch (Generic) */
.dctc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.dctc-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

.dctc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.dctc-slider {
    background-color: #8e44ad;
}

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

/* Preview Panel */
.dctc-preview-panel {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.dctc-preview {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dctc-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.dctc-preview-device {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    background: #f9fafb;
    min-height: 400px;
    position: relative;
}

/* Navigation Buttons */
.dctc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.dctc-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dctc-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.dctc-btn-secondary:hover {
    background: #e5e7eb;
}

.dctc-btn-primary {
    background: #8e44ad;
    color: #fff;
}

.dctc-btn-primary:hover {
    background: #7d3c98;
}

.dctc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info Box */
.dctc-info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.dctc-info-box p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
}

.dctc-info-box code {
    background: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 13px;
    color: #8e44ad;
}

/* Responsive */
@media (max-width: 1200px) {
    .dctc-content {
        grid-template-columns: 1fr;
    }

    .dctc-preview-panel {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .dctc-tabs {
        flex-wrap: wrap;
    }

    .dctc-tab {
        font-size: 12px;
        padding: 8px 12px;
    }

    .dctc-section {
        padding: 20px;
    }
}

/* Loading State */
.dctc-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Success Message */
.dctc-success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.dctc-success-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.dctc-btn.loading {
    position: relative;
    color: transparent;
}

.dctc-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* Customization Section Styles */
.dctc-position-selector {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dctc-position-option {
    cursor: pointer;
}

.dctc-position-option input[type="radio"] {
    display: none;
}

.dctc-position-option .position-card {
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.dctc-position-option .position-card:hover {
    border-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dctc-position-option.active .position-card {
    border-color: #8e44ad;
    background: #f9fafb;
}

.dctc-position-option .position-card span {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Icon Selector */
.dctc-icon-option {
    cursor: pointer;
}

.dctc-icon-option input[type="radio"] {
    display: none;
}

.dctc-icon-option .icon-card {
    padding: 15px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dctc-icon-option .icon-card:hover {
    border-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dctc-icon-option.active .icon-card {
    border-color: #8e44ad;
    background: #f9fafb;
}

.dctc-icon-option .icon-card svg {
    color: #6b7280;
    margin-bottom: 8px;
}

.dctc-icon-option.active .icon-card svg {
    color: #8e44ad;
}

.dctc-icon-option .icon-card span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.dctc-size-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

.dctc-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #8e44ad;
    border-radius: 50%;
    cursor: pointer;
}

.dctc-size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #8e44ad;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}