/* General Admin Panel Styling */
.atlas-dmsg-admin-panel {
    max-width: 1200px;
    margin: 20px 0;
}

.atlas-dmsg-admin-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.atlas-dmsg-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffa800;
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
}

.atlas-dmsg-logo .dashicons {
    color: white;
    font-size: 24px;
}

.atlas-dmsg-version {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #4b2900;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
}

.atlas-dmsg-header-text {
    flex: 1;
}

.atlas-dmsg-header-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Tabs Styling */
#atlas-dmsg-tabs {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.atlas-dmsg-tab-content {
    padding: 20px;
}

.nav-tab-wrapper {
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    border-bottom: 1px solid #ccc;
}

/* Fix for tab highlighting */
#atlas-dmsg-tabs .nav-tab-wrapper .ui-tabs-active a.nav-tab {
    background-color: #fff;
    color: #000;
    border-bottom-color: #fff;
}

#atlas-dmsg-tabs .nav-tab-wrapper a.nav-tab {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    padding: 10px 15px;
    margin-right: 5px;
    margin-bottom: -1px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
}

#atlas-dmsg-tabs .nav-tab-wrapper a.nav-tab:hover {
    background-color: #fff;
    color: #000;
}

/* Layout Selector */
.atlas-dmsg-layout-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.atlas-dmsg-layout-option {
    width: 150px;
    cursor: pointer;
    border: 3px solid #ddd;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.atlas-dmsg-layout-option.selected {
    border-color: #ffa800;
    box-shadow: 0 0 8px rgba(255, 168, 0, 0.5);
}

.atlas-dmsg-layout-option input[type="radio"] {
    display: none;
}

.atlas-dmsg-layout-preview {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.atlas-dmsg-layout-1-preview {
    background-color: #fef9e7;
    border-left: 2px dashed #ffa800;
    border-right: 2px dashed #ffa800;
    border-bottom: 2px dashed #ffa800;
    position: relative;
}

.atlas-dmsg-layout-1-preview::before {
    content: "";
    display: block;
    width: 100%;
    height: 5px;
    background-color: #ffa800;
    position: absolute;
    top: 0;
    left: 0;
}

.atlas-dmsg-layout-2-preview {
    background: #ffffff;
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.atlas-dmsg-layout-2-preview::before {
    content: "🚚";
    font-size: 24px;
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.atlas-dmsg-layout-3-preview {
    background: linear-gradient(135deg, #ffe8d4, #ffd8b2);
    border: 2px solid #ff6b6b;
    position: relative;
    overflow: hidden;
}

.atlas-dmsg-layout-3-preview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ff6b6b;
}

.atlas-dmsg-preview-content {
    font-size: 12px;
    font-weight: bold;
}

/* Scenario Boxes */
.atlas-dmsg-scenario-box {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.atlas-dmsg-scenario-box:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.atlas-dmsg-scenario-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    border-radius: 5px 5px 0 0;
}

.atlas-dmsg-scenario-header h3 {
    margin: 0;
    flex: 1;
    font-size: 16px;
}

.atlas-dmsg-scenario-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atlas-dmsg-scenario-content {
    padding: 15px;
}

/* Toggle Switch */
.atlas-dmsg-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 24px;
    margin-right: 10px;
}

.atlas-dmsg-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.atlas-dmsg-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.atlas-dmsg-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.atlas-dmsg-toggle input:checked + .atlas-dmsg-toggle-slider {
    background-color: #ffa800;
}

.atlas-dmsg-toggle input:focus + .atlas-dmsg-toggle-slider {
    box-shadow: 0 0 1px #ffa800;
}

.atlas-dmsg-toggle input:checked + .atlas-dmsg-toggle-slider:before {
    transform: translateX(36px);
}

.atlas-dmsg-toggle-label {
    display: none;
}

/* Day Selector */
.atlas-dmsg-days-selector {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.atlas-dmsg-day-button {
    display: inline-block;
    margin-bottom: 5px;
    cursor: pointer;
}

.atlas-dmsg-day-button input {
    display: none;
}

.atlas-dmsg-day-button span {
    display: inline-block;
    padding: 5px 10px;
    background: #f1f1f1;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.atlas-dmsg-day-button.selected span,
.atlas-dmsg-day-button input:checked + span {
    background: #ffa800;
    color: white;
    border-color: #e89700;
}

/* HTML5 Time Input Styling */
input[type="time"].atlas-dmsg-time-input {
    height: 32px;
    width: 120px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
    color: #32373c;
    outline: 0;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

input[type="time"].atlas-dmsg-time-input:focus {
    border-color: #ffa800;
    box-shadow: 0 0 0 1px #ffa800;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    input[type="time"].atlas-dmsg-time-input {
        height: 40px;
        width: 150px;
        padding: 8px 10px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Time inputs */
.atlas-dmsg-time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atlas-dmsg-time-field {
    display: flex;
    flex-direction: column;
}

.atlas-dmsg-time-field label {
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.atlas-dmsg-time-separator {
    margin-top: 20px;
    font-weight: bold;
    color: #666;
}

/* Message Preview */
.atlas-dmsg-message-preview {
    margin-top: 10px;
}

.atlas-dmsg-message-preview label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12px;
    color: #666;
}

.atlas-dmsg-preview-box {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 3px;
    font-family: "Trebuchet MS", sans-serif;
}

/* Layout-specific preview boxes */
.atlas-dmsg-preview-box.atlas-dmsg-layout-1 {
    background-color: #fef9e7;
    border-left: 2px dashed #ffa800;
    border-right: 2px dashed #ffa800;
    border-bottom: 2px dashed #ffa800;
    border-radius: 0 0 5px 5px;
    position: relative;
    padding-top: 20px;
}

.atlas-dmsg-preview-box.atlas-dmsg-layout-1::before {
    content: "";
    display: block;
    width: 100%;
    height: 5px;
    background-color: #ffa800;
    position: absolute;
    top: 0;
    left: 0;
}

.atlas-dmsg-preview-box.atlas-dmsg-layout-2 {
    background: #ffffff;
    border: 2px solid #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding-top: 30px;
    position: relative;
}

.atlas-dmsg-preview-box.atlas-dmsg-layout-2::before {
    content: "🚚";
    font-size: 24px;
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
}

.atlas-dmsg-preview-box.atlas-dmsg-layout-3 {
    background: linear-gradient(135deg, #ffe8d4, #ffd8b2);
    border: 2px solid #ff6b6b;
    position: relative;
    overflow: hidden;
    padding-top: 20px;
}

.atlas-dmsg-preview-box.atlas-dmsg-layout-3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ff6b6b;
}

/* Checkbox Group */
.atlas-dmsg-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atlas-dmsg-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.atlas-dmsg-checkbox-text {
    margin-left: 8px;
}

/* Number Input */
.atlas-dmsg-number-input {
    width: 80px;
}

/* Tooltip */
.atlas-dmsg-tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #ffa800;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 11px;
    line-height: 16px;
    margin-left: 5px;
    cursor: help;
}

/* Help & Support Tab */
.atlas-dmsg-help-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.atlas-dmsg-help-section:last-child {
    border-bottom: none;
}

.atlas-dmsg-help-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffa800;
    display: inline-block;
}

.atlas-dmsg-help-content {
    margin-left: 15px;
}

.atlas-dmsg-help-content code {
    background: #f1f1f1;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 90%;
}

/* Add Button and Submit Wrapper */
.atlas-dmsg-add-scenario-wrapper {
    margin: 20px 0;
    text-align: center;
}

#add-scenario {
    padding: 8px 15px;
    font-size: 14px;
}

#add-scenario .dashicons {
    margin-right: 5px;
}

.atlas-dmsg-submit-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 5px;
    text-align: right;
}

.atlas-dmsg-submit-wrapper .button-primary {
    padding: 8px 20px;
    font-size: 14px;
    height: auto;
}

/* Responsive Fixes */
@media screen and (max-width: 782px) {
    .atlas-dmsg-time-inputs {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .atlas-dmsg-time-separator {
        margin: 5px 0;
    }
    
    .atlas-dmsg-layout-selector {
        flex-direction: column;
    }
    
    .atlas-dmsg-layout-option {
        width: 100%;
    }
}

/* Layout Settings Tab */
.atlas-dmsg-layouts-tabs-nav {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    padding: 0;
}

.atlas-dmsg-layouts-tabs-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.atlas-dmsg-layouts-tabs-nav li a {
    display: block;
    padding: 10px 15px;
    background: #f1f1f1;
    text-decoration: none;
    border: 1px solid #ccc;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: 600;
    color: #555;
}

.atlas-dmsg-layouts-tabs-nav li.ui-tabs-active a {
    background: #fff;
    border-bottom-color: #fff;
    color: #000;
}

.atlas-dmsg-layout-settings-panel {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
    margin-top: -1px;
}

.atlas-dmsg-layout-preview-box {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.atlas-dmsg-live-preview {
    padding: 20px;
    position: relative;
    border-radius: 5px;
    margin-top: 10px;
}

/* Layout preview styles */
.atlas-dmsg-layout-1-preview {
    background-color: #fef9e7;
    border-left: 2px dashed #ffa800;
    border-right: 2px dashed #ffa800;
    border-bottom: 2px dashed #ffa800;
    border-radius: 0 0 5px 5px;
    position: relative;
    padding-top: 20px;
}

.atlas-dmsg-layout-1-preview::before {
    content: "";
    display: block;
    width: 100%;
    height: 5px;
    background-color: #ffa800;
    position: absolute;
    top: 0;
    left: 0;
}

.atlas-dmsg-layout-1-preview strong {
    color: #b53300;
    font-weight: bold;
}

.atlas-dmsg-layout-2-preview {
    background: #ffffff;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-top: 30px;
}

.atlas-dmsg-layout-2-preview::before {
    content: "🚚";
    font-size: 24px;
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.atlas-dmsg-layout-2-preview strong {
    color: #2980b9;
    font-weight: bold;
}

.atlas-dmsg-layout-3-preview {
    background: linear-gradient(135deg, #ffe8d4, #ffd8b2);
    border: 2px solid #ff6b6b;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    padding-top: 20px;
}

.atlas-dmsg-layout-3-preview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ff6b6b;
}

.atlas-dmsg-layout-3-preview strong {
    color: #d32f2f;
    font-weight: bold;
}

/* Reset button styling */
.atlas-dmsg-reset-layout {
    margin-top: 10px !important;
}

.atlas-dmsg-reset-layout .dashicons {
    margin-right: 5px;
    font-size: 14px;
    line-height: 1.5;
}

/* Message styling */
.atlas-dmsg-layout-settings-panel .notice {
    margin: 10px 0 15px;
}

/* URL indicator in preview */
.atlas-dmsg-preview-box.atlas-dmsg-has-url {
    cursor: pointer;
    position: relative;
}

.atlas-dmsg-url-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.7;
}

/* CSS Tooltips */
.atlas-dmsg-tooltip {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #ffa800;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 11px;
    line-height: 16px;
    margin-left: 5px;
    cursor: help;
}

.atlas-dmsg-tooltip:hover:after {
    content: attr(title);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 999;
    font-size: 12px;
    line-height: 1.4;
}

/* Midnight crossing notification */
.atlas-dmsg-midnight-notice {
    margin: 10px 0;
}

.atlas-dmsg-midnight-notice .notice {
    margin: 0;
    padding: 8px 12px;
}

/* Highlight effect for day selector */
.atlas-dmsg-highlight-days {
    border: 1px dashed #007cba;
    padding: 8px;
    border-radius: 4px;
    background-color: rgba(0, 124, 186, 0.05);
    transition: all 0.3s ease;
}