/* SlimStop Global Styles */
body {
    background-color: #000;
    color: #e0e0e0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.slimstop {
    max-width: 720px;
    margin: 1.5rem auto;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.slimstop-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.slimstop-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
    color: #fff;
}

.slimstop-btn {
    appearance: none;
    border: 1px solid #3b82f6;
    background: #2563eb;
    color: #fff;
    padding: .6rem .9rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.slimstop-btn:hover {
    background: #1d4ed8;
}

.slimstop-input {
    width: 100%;
    padding: .55rem .6rem;
    border: 1px solid #444;
    border-radius: 10px;
    font-family: inherit;
    background: #2a2a2a;
    color: #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 560px) {
    .slimstop {
        padding: 0 1rem;
    }
    
    .slimstop-card {
        padding: 12px 14px;
    }
}

/* SlimStop Base Styles */
.slimstop {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

.slimstop-section {
    margin-bottom: 2rem;
    position: relative;
}

.slimstop-section-number {
    position: absolute;
    left: -2rem;
    top: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0073aa;
}

.slimstop-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #23282d;
}

.slimstop-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.slimstop-help {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.slimstop-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.slimstop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .slimstop-grid {
        grid-template-columns: 1fr;
    }
}

.slimstop-colspan {
    grid-column: 1 / -1;
}

.slimstop-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.slimstop-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.slimstop-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.slimstop-btn:hover {
    background: #005a87;
}

.slimstop-btn:disabled {
    background: #94a6b8;
    cursor: not-allowed;
}

.slimstop-btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.slimstop-btn-primary {
    background: #23282d;
}

.slimstop-btn-primary:hover {
    background: #000;
}

.slimstop-status {
    color: #0073aa;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.slimstop-form-group {
    margin-bottom: 1rem;
}

.slimstop-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.slimstop-form-actions {
    margin-top: 1.5rem;
}

/* Module specific styles will be loaded separately */

.slimstop-tab-nav {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.slimstop-tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
}

.slimstop-tab-btn.active {
  opacity: 1;
  border-bottom: 2px solid #2563eb;
}

.slimstop-tab-panel {
  display: none;
}

.slimstop-tab-panel.active {
  display: block;
}

/* SlimStop Tabs */
.slimstop-tabs {
    margin-bottom: 20px;
}

.slimstop-tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.slimstop-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slimstop-tab-btn:hover {
    opacity: 1;
}

.slimstop-tab-btn.active {
    opacity: 1;
    border-bottom: 2px solid #2563eb;
}

.slimstop-tab-panel {
    display: none;
}

.slimstop-tab-panel.active {
    display: block;
}

/* Add space between modules */
.slimstop-module {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Remove border from last module */
.slimstop-module:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Alternative approach if modules don't have the .slimstop-module class */
#slimstop-app > div {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

#slimstop-app > div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* For mobile devices */
@media (max-width: 768px) {
    .slimstop-module {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    #slimstop-app > div {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
}

/* Card-style modules for individual shortcodes */
#slimstop-app > div {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

/* Card-style modules for tab panels */
.slimstop-panel .slimstop-interaction > div {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

/* Remove margin from last module */
#slimstop-app > div:last-child,
.slimstop-panel .slimstop-interaction > div:last-child {
    margin-bottom: 0;
}

/* Dark mode styles - more specific and comprehensive */
@media (prefers-color-scheme: dark) {
    /* Dark theme for body background */
    body {
        background-color: #1a1a1a !important;
        color: #e0e0e0 !important;
    }

    /* Dark theme for modules */
    #slimstop-app > div,
    .slimstop-panel .slimstop-interaction > div {
        background: #2d2d2d !important;
        border: 1px solid #444 !important;
        color: #e0e0e0 !important;
    }

    /* Dark theme for inputs and text areas */
    #slimstop-app input,
    #slimstop-app textarea,
    #slimstop-app select,
    .slimstop-panel input,
    .slimstop-panel textarea,
    .slimstop-panel select {
        background: #3a3a3a !important;
        border: 1px solid #555 !important;
        color: #ffffff !important;
    }

    /* Dark theme for buttons */
    #slimstop-app button,
    .slimstop-panel button {
        background: #3a3a3a !important;
        border: 1px solid #555 !important;
        color: #ffffff !important;
    }

    /* Special button states */
    #slimstop-app button:hover,
    .slimstop-panel button:hover {
        background: #4a4a4a !important;
        border-color: #666 !important;
    }

    #slimstop-app button.active,
    .slimstop-panel button.active {
        background: #0073aa !important;
        color: white !important;
        border-color: #0073aa !important;
    }

    /* Dark theme for headings */
    #slimstop-app h1,
    #slimstop-app h2,
    #slimstop-app h3,
    #slimstop-app h4,
    #slimstop-app h5,
    #slimstop-app h6,
    .slimstop-panel h1,
    .slimstop-panel h2,
    .slimstop-panel h3,
    .slimstop-panel h4,
    .slimstop-panel h5,
    .slimstop-panel h6 {
        color: #ffffff !important;
    }

    /* Dark theme for labels */
    #slimstop-app label,
    .slimstop-panel label {
        color: #e0e0e0 !important;
    }

    /* Dark theme for links */
    #slimstop-app a,
    .slimstop-panel a {
        color: #4dabf7 !important;
    }

    /* Dark theme for text content */
    #slimstop-app p,
    #slimstop-app span,
    .slimstop-panel p,
    .slimstop-panel span {
        color: #e0e0e0 !important;
    }

    /* Special styling for audio module to reduce breaks */
    .slimstop-audio {
        padding: 15px !important;
    }

    .slimstop-audio .slimstop-section {
        margin-bottom: 10px !important;
    }

    .slimstop-audio .slimstop-section:last-child {
        margin-bottom: 0 !important;
    }

    /* Dark theme for navigation tabs */
    .slimstop-nav-btn {
        background: #3a3a3a !important;
        color: #e0e0e0 !important;
        border: 1px solid #555 !important;
    }

    .slimstop-nav-btn:hover {
        background: #4a4a4a !important;
        border-color: #666 !important;
    }

    .slimstop-nav-btn.active {
        background: #0073aa !important;
        color: white !important;
        border-color: #0073aa !important;
    }

    .slimstop-nav-buttons {
        border-bottom: 2px solid #444 !important;
    }

    /* Dark theme for help text */
    .slimstop-help {
        color: #b0b0b0 !important;
    }

    /* Dark theme for timer display */
    .slimstop-timer {
        background: #3a3a3a !important;
        color: #ffffff !important;
        border: 1px solid #555 !important;
    }

    /* Dark theme for card sections */
    .slimstop-card {
        background: #2d2d2d !important;
        border: 1px solid #444 !important;
    }

    .slimstop-section {
        background: transparent !important;
    }
}

/* For mobile devices */
@media (max-width: 768px) {
    #slimstop-app > div,
    .slimstop-panel .slimstop-interaction > div {
        padding: 15px;
        margin-bottom: 15px;
    }
}
/* Button styles */
.slimstop-btn,
#slimstop-app button,
.slimstop-panel button,
.slimstop-navigation button {
    background-color: #0073aa !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.slimstop-btn:hover,
#slimstop-app button:hover,
.slimstop-panel button:hover,
.slimstop-navigation button:hover {
    background-color: #005a87 !important;
}

.slimstop-btn:active,
#slimstop-app button:active,
.slimstop-panel button:active,
.slimstop-navigation button:active {
    background-color: #004569 !important;
}

.slimstop-btn:disabled,
#slimstop-app button:disabled,
.slimstop-panel button:disabled,
.slimstop-navigation button:disabled {
    background-color: #a0a0a0 !important;
    cursor: not-allowed;
}

/* Dark mode button adjustments */
@media (prefers-color-scheme: dark) {
    .slimstop-btn,
    #slimstop-app button,
    .slimstop-panel button,
    .slimstop-navigation button {
        background-color: #0073aa !important;
        color: #ffffff !important;
    }

    .slimstop-btn:hover,
    #slimstop-app button:hover,
    .slimstop-panel button:hover,
    .slimstop-navigation button:hover {
        background-color: #005a87 !important;
    }

    .slimstop-btn:active,
    #slimstop-app button:active,
    .slimstop-panel button:active,
    .slimstop-navigation button:active {
        background-color: #004569 !important;
    }

    .slimstop-btn:disabled,
    #slimstop-app button:disabled,
    .slimstop-panel button:disabled,
    .slimstop-navigation button:disabled {
        background-color: #555555 !important;
    }
}
/* Radio box styling */
.slimstop-radio-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.slimstop-radio-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.slimstop-radio-box:hover {
    background: #e9ecef;
    border-color: #bbb;
}

.slimstop-radio-box input[type="radio"] {
    display: none;
}

.slimstop-radio-box span {
    font-weight: 500;
}

.slimstop-radio-box input[type="radio"]:checked + span {
    color: #0073aa;
}

.slimstop-radio-box input[type="radio"]:checked + span::before {
    content: "✓ ";
    color: #0073aa;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .slimstop-radio-box {
        background: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }

    .slimstop-radio-box:hover {
        background: #4a4a4a;
        border-color: #666;
    }

    .slimstop-radio-box input[type="radio"]:checked + span {
        color: #4dabf7;
    }

    .slimstop-radio-box input[type="radio"]:checked + span::before {
        color: #4dabf7;
    }
}
/* Radio box styling */
.slimstop-radio-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.slimstop-radio-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.slimstop-radio-box:hover {
    background: #e9ecef;
    border-color: #bbb;
}

.slimstop-radio-box input[type="radio"] {
    display: none;
}

.slimstop-radio-box span {
    font-weight: 500;
}

.slimstop-radio-box input[type="radio"]:checked + span {
    color: #0073aa;
}

.slimstop-radio-box input[type="radio"]:checked + span::before {
    content: "✓ ";
    color: #0073aa;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .slimstop-radio-box {
        background: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }

    .slimstop-radio-box:hover {
        background: #4a4a4a;
        border-color: #666;
    }

    .slimstop-radio-box input[type="radio"]:checked + span {
        color: #4dabf7;
    }

    .slimstop-radio-box input[type="radio"]:checked + span::before {
        color: #4dabf7;
    }
}
