/* Activity Creator Plugin Styles */


/* Override any parent container max-widths that might affect us */
.activity-creator-container * {
    max-width: none ;
}

/* Header Controls */
.activity-creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-toggle {
    display: flex;
    background: #f1f3f4;
    border-radius: 8px;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-toggle button {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #333333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.view-toggle button:before {
    content: '';
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
}

.view-toggle button[data-view="grid"]:before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiMzMzMzMzMiLz4KPHJlY3QgeD0iMTQiIHk9IjMiIHdpZHRoPSI3IiBoZWlnaHQ9IjciIHJ4PSIxIiBmaWxsPSIjMzMzMzMzIi8+CjxyZWN0IHg9IjMiIHk9IjE0IiB3aWR0aD0iNyIgaGVpZ2h0PSI3IiByeD0iMSIgZmlsbD0iIzMzMzMzMyIvPgo8cmVjdCB4PSIxNCIgeT0iMTQiIHdpZHRoPSI3IiBoZWlnaHQ9IjciIHJ4PSIxIiBmaWxsPSIjMzMzMzMzIi8+Cjwvc3ZnPgo=');
}

.view-toggle button[data-view="list"]:before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggNmgxM00yIDZoMm0xIDVoMTNNMiAxMWgybTEgNWgxM00yIDE2aDIiIHN0cm9rZT0iIzMzMzMzMyIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+Cg==');
}

.view-toggle button.active {
    background: white;
    color: #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

.view-toggle button:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #333333;
}

.add-activity-btn {
    background: linear-gradient(135deg, #a6b3ee 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-activity-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Activity Grid - Better width utilization with more columns */
.activities-grid {
    display: grid ;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) ;
    gap: 15px ;
    margin-bottom: 30px ;
    width: 100% ;
    max-width: none ;
    padding: 0 30px ;
    box-sizing: border-box ;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* Force header to use full width too */
.activity-creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    width: 100% ;
    max-width: none ;
    padding: 0 30px ;
    box-sizing: border-box ;
    margin-left: auto;
    margin-right: auto;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Activity Cards */
.activity-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.activity-card-preview {
    width: 100%;
    height: 140px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.activity-card-preview .word-search-mini {
    font-size: 8px;
    line-height: 1;
    color: #333;
    opacity: 0.7;
}

.activity-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.activity-card-title {
    font-size: 16px !important;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 6px 0 ;
    line-height: 1.3 ;
}

.activity-card-meta {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 0;
}

.activity-card-play-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    flex-shrink: 0;
}

.activity-card-play-area .play-activity {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.activity-card-play-area .play-activity:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.activity-card-play-area .play-icon {
    font-size: 12px;
}

/* Kebab Menu */
.activity-card-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.activity-menu-trigger {
    background: rgba(255, 255, 255, 0.9) ;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.activity-menu-trigger:hover {
    background: white ;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.kebab-icon {
    font-size: 16px;
    color: #6c757d ;
    line-height: 1;
    font-weight: bold;
}

.activity-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 4px;
}

.activity-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: none !important;
    background: white !important;
    width: 100%;
    min-width: 100px;
    text-align: left;
    font-size: 13px;
    color: #2c3e50 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: normal;
    text-decoration: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.activity-menu-item:hover {
    background: #f8f9fa !important;
    color: #2c3e50 !important;
}

.activity-menu-item.delete-activity:hover {
    background: #fee !important;
    color: #dc3545 !important;
}

.menu-icon {
    font-size: 12px;
    width: 16px;
    display: inline-block;
    text-align: center;
}



.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: auto;
    min-width: auto;
    color: #333 ; /* Ensure text is visible by default */
}

.btn-primary {
    background: #007cba ;
    color: white ;
}

.btn-primary:hover {
    background: #005a87 ;
    color: white ;
}

.btn-secondary {
    background: #6c757d ;
    color: white ;
}

.btn-secondary:hover {
    background: #545b62 ;
    color: white ;
}

.btn-danger {
    background: #dc3545 ;
    color: white ;
}

.btn-danger:hover {
    background: #c82333 ;
    color: white ;
}

.btn:disabled {
    background: #e9ecef ;
    color: #6c757d ;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:disabled:hover {
    background: #e9ecef ;
    color: #6c757d ;
}

/* Ensure all form elements have visible text */
.form-control, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea, 
select {
    color: #333 ;
    background-color: white ;
    border: 1px solid #ccc ;
}

/* Ensure labels and text are visible */
.form-label,
label,
.form-text,
.form-help-text,
.text-muted {
    color: #333 ;
}

/* Ensure modal content text is visible */
.modal-content,
.modal-body,
.modal-header {
    color: #333 ;
}

/* Modal Styles - Activity Wizard */
.activity-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(4px);
}

/* Ensure all buttons in modals have visible text */
.activity-modal .btn,
.modal-content .btn,
.wizard-content .btn {
    color: white ;
    width: auto ;
    flex: none ;
}

.activity-modal .btn-primary,
.modal-content .btn-primary,
.wizard-content .btn-primary {
    background: #007cba ;
    color: white ;
}

.activity-modal .btn-secondary,
.modal-content .btn-secondary,
.wizard-content .btn-secondary {
    background: #6c757d ;
    color: white ;
}

.activity-modal .btn-danger,
.modal-content .btn-danger,
.wizard-content .btn-danger {
    background: #dc3545 ;
    color: white ;
}

.modal-content.activity-wizard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    min-width: 320px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Standard Modal Content (Edit Modal) */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    min-width: 320px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    background: #fafbfc;
    min-height: 0; /* Allow flex shrinking */
}

/* Ensure form groups don't get cut off */
.form-group {
    margin-bottom: 20px;
    flex-shrink: 0;
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e8ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Different styling for different field types */
.form-group.display-field {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.form-group.input-field {
    background: white;
    border: 2px solid #e1e5e9;
    transition: border-color 0.2s ease;
}

.form-group.input-field:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group.content-field {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-left: 4px solid #ff9800;
}

/* Template form containers */
.template-form {
    flex-shrink: 0;
}

/* Template display for edit modal */
.template-display-readonly {
    background: #f1f3f4;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #dadce0;
    color: #3c4043;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.template-display-readonly::before {
    content: "🏷️";
    font-size: 16px;
}

/* Dynamic edit form container */
#edit-dynamic-form-container {
    margin-top: 10px;
    flex-shrink: 0;
}

/* Clean separation for edit sections */
#edit-dynamic-form-container .form-group {
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 16px;
}

#edit-dynamic-form-container .form-group:last-child {
    border-bottom: none;
    margin-bottom: 12px;
}

/* Edit-specific containers */
.edit-word-container {
    margin-top: 10px;
}

.edit-image-container {
    margin-top: 15px;
}

.edit-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    min-height: 60px;
}

.edit-images-preview:empty::before {
    content: "No images uploaded yet.";
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
    display: block;
    text-align: center;
    width: 100%;
    padding: 20px;
}

/* Make sure background section is visible and scrollable */
#edit-background-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    flex-shrink: 0;
}

/* Wizard Header */
.wizard-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.wizard-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wizard-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

.wizard-activity-type {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

.wizard-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #007cba;
    color: white;
}

.progress-step.completed {
    background: #28a745;
    color: white;
}

.wizard-step {
    min-height: 400px;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.step-description {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Template Grid - More Compact and Responsive */
.template-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px 12px;
    align-items: start;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
}

.template-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.template-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    background: white !important;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 10px;
    text-align: center;
    flex-shrink: 0;
}

.template-button:hover:not(:disabled) {
    border-color: #e9a403;
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 124, 186, 0.15);
}

.template-button.selected {
    border-color: #28a745 !important;
    background: #d4edda !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3) !important;
    transform: translateY(-1px);
}

.template-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.template-icon {
    font-size: 24px;
    margin-bottom: 5px;
    display: block;
}

.template-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    line-height: 1.1;
    margin: 0;
}

.coming-soon {
    font-size: 9px;
    color: #6c757d;
    font-weight: 400;
    margin-top: 2px;
}

.template-description {
    padding: 12px 14px;
    background: #f8fbff;
    border-radius: 6px;
    border-left: 3px solid #007cba;
    margin-top: 8px;
}

.template-description.disabled {
    opacity: 0.6;
    border-left-color: #6c757d;
    background: #f8f9fa;
}

.template-description h5 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 6px 0;
}

.template-description p {
    font-size: 12px;
    color: #5f6368;
    margin: 0;
    line-height: 1.3;
}

/* Wizard Footer - Compact Button Layout */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    flex-shrink: 0;
}

.wizard-footer .btn {
    min-width: 80px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: auto;
    flex: none;
}

.wizard-footer .btn-primary {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.wizard-footer .btn-primary:hover:not(:disabled) {
    background: #75bde1 !important;
    border-color: #006ba1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 124, 186, 0.3);
}

.wizard-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.wizard-footer .btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Modal Footer - Consistent with Wizard */
.modal-footer {
    padding: 16px 25px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.modal-footer .btn {
    min-width: 80px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    width: auto;
    flex: none;
}

/* Form Labels - Better Hierarchy */
.form-label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-control-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
}

/* Dynamic Content Forms */
#dynamic-content-form {
    margin-top: 20px;
}

/* Preview Container */
#activity-preview-container {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    min-height: 300px;
}

/* Responsive Design for Wizard - Mobile First */
@media (max-width: 768px) {
    .modal-content.activity-wizard {
        width: 95%;
        max-height: 90vh;
        min-width: 280px;
    }
    
    .modal-content {
        width: 95%;
        min-width: 280px;
    }
    
    .wizard-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .modal-body {
        padding: 16px 18px;
    }
    
    .wizard-title-section {
        order: 1;
        flex: 1;
    }
    
    .wizard-progress {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .modal-close {
        order: 2;
        font-size: 30px;
        width: 24px;
        height: 24px;
    }
    
    .wizard-step-title {
        font-size: 16px;
    }
    
    .wizard-activity-type {
        font-size: 12px;
    }
    
    .template-selection-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
        max-height: 350px;
    }
    
    .template-button {
        width: 65px;
        height: 65px;
        padding: 6px;
    }
    
    .template-icon {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .template-name {
        font-size: 10px;
    }
    
    .template-description {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .template-description h5 {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .template-description p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .progress-step {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .form-group {
        margin-bottom: 16px;
        padding: 12px;
    }
    
    .wizard-footer,
    .modal-footer {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .wizard-footer .btn,
    .modal-footer .btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .background-options {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 6px;
    }
    
    .background-option {
        height: 40px;
        min-height: 40px;
        max-height: 45px;
    }
    
    .upload-option {
        font-size: 16px;
        padding: 3px;
    }
    
    .upload-option small {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .modal-content.activity-wizard,
    .modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .wizard-header {
        padding: 10px 12px;
    }
    
    .modal-body {
        padding: 12px 14px;
    }
    
    .template-button {
        width: 70px;
        height: 70px;
        padding: 6px;
    }
    
    .template-icon {
        font-size: 18px;
    }
    
    .template-name {
        font-size: 10px;
    }
    
    .background-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    
    .background-option {
        height: 35px;
        min-height: 35px;
        max-height: 40px;
    }
    
    .form-group {
        padding: 10px;
        margin-bottom: 14px;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .wizard-footer,
    .modal-footer {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .wizard-footer .btn,
    .modal-footer .btn {
        min-width: 60px;
        padding: 7px 10px;
        font-size: 12px;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    display: none !important;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ea0a02  !important;
    padding: 0;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #f30d00 !important;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-control-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Template Selection */
.template-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.template-option {
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.template-option:hover {
    border-color: #5ac2f6 !important;
    background: #f8f9fa;
}

.template-option.selected {
    border-color: #e4bc09 !important;
    background: #e3f2fd;
}

.template-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #6c757d;
}

.template-name {
    font-size: 18px !important;
    font-weight: 600;
    color: #000000;
}

/* Background Options - Compact Grid */
.background-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 8px;
    margin-top: 12px;
    max-width: 100%;
}

.background-option {
    aspect-ratio: 1;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 50px;
    min-height: 50px;
    max-height: 55px;
}

.background-option:hover {
    border-color: #007cba;
    transform: scale(1.03);
}

.background-option.selected {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.upload-option {
    background: #f8f9fa;
    border: 2px dashed #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6c757d;
    position: relative;
    padding: 4px;
}

.upload-option .upload-content,
.pixabay-option .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.upload-option .upload-icon,
.pixabay-option .upload-icon {
    display: block;
    margin-bottom: 2px;
}

.upload-option .upload-text,
.pixabay-option .upload-text {
    font-size: 9px;
    line-height: 1;
    margin: 0;
}

.pixabay-option {
    background: #f0f8ff;
    border: 2px dashed #007cba;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #007cba;
    position: relative;
    padding: 4px;
    cursor: pointer;
}

.pixabay-option:hover {
    background: #e6f3ff;
    border-color: #0056b3;
}

.upload-option small {
    font-size: 9px;
    line-height: 1;
    margin-top: 2px;
}

.upload-option.uploading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Word Search Specific */
.word-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    min-height: 60px;
}

.word-tag {
    background: #e3f2fd ;
    color: #1976d2 ;
    padding: 8px 12px ;
    border-radius: 20px ;
    font-size: 14px ;
    display: inline-flex ;
    align-items: center ;
    gap: 8px ;
    margin: 4px ;
    border: 1px solid #bbdefb ;
    position: relative;
}

.activity-creator-container .word-tag {
    background: #e3f2fd ;
    color: #1976d2 ;
    border: 1px solid #bbdefb ;
}

.word-text {
    font-weight: 500;
}

.word-tag-remove {
    background: #fff ;
    border: 1px solid #dc3545 ;
    color: #dc3545 ;
    cursor: pointer;
    font-size: 16px ;
    font-weight: bold ;
    padding: 0 ;
    width: 22px ;
    height: 22px ;
    border-radius: 50% ;
    display: inline-flex ;
    align-items: center ;
    justify-content: center ;
    margin-left: 4px ;
    transition: all 0.2s ease ;
    line-height: 1 ;
    flex-shrink: 0;
    box-shadow: none ;
    text-decoration: none ;
    outline: none ;
}

.word-tag .word-tag-remove {
    background: #fff ;
    border: 1px solid #dc3545 ;
    color: #dc3545 ;
}

.word-tag-remove:hover,
.word-tag .word-tag-remove:hover {
    background: #dc3545 ;
    color: white ;
    border-color: #dc3545 ;
    transform: scale(1.1) ;
}

.word-tag-remove:focus,
.word-tag .word-tag-remove:focus {
    background: #dc3545 ;
    color: white ;
    border-color: #dc3545 ;
    outline: none ;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) ;
}

/* Preview Styles */
.activity-preview {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    background: #f8f9fa;
}

.word-search-grid {
    display: inline-grid;
    gap: 2px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word-search-cell {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e1e5e9;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.word-search-cell:hover {
    background: #f0f8ff;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design - Better width utilization */
@media (max-width: 1200px) {
    .activity-creator-container {
        padding: 20px 15px ;
    }
    
    .activities-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 0 20px;
    }
}

@media (max-width: 900px) {
    .activity-creator-container {
        padding: 15px 12px ;
    }
    
    .activities-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .activity-creator-container {
        padding: 15px;
    }
    
    .activity-creator-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .activities-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    
    /* Optimize buttons for smaller cards */
    .activity-card-actions {
        gap: 4px;
    }
    
    .btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 50px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .background-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .template-selection {
        grid-template-columns: 1fr;
    }
    
    .background-options {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .activity-card-actions {
        flex-direction: column;
    }
}

/* Scrambler Form Styles */
.scrambler-images-container,
.edit-scrambler-images-container,
.imagepuzzles-images-container,
.edit-imagepuzzles-images-container {
    margin-bottom: 15px;
    display: block ;
    visibility: visible ;
}

/* Force template forms to be visible when shown */
#scrambler-form,
#imagepuzzles-form {
    display: block ;
}

#scrambler-form .scrambler-images-container,
#imagepuzzles-form .imagepuzzles-images-container {
    display: block ;
    visibility: visible ;
}

/* Image Upload Styles - More Compact */
.image-upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.activity-image-uploader {
    padding: 6px 12px ;
    border: 1px dashed #cbd5e0 ;
    border-radius: 4px;
    background: #f7fafc ;
    color: #4a5568 ;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    display: inline-block ;
    visibility: visible ;
    opacity: 1 ;
    white-space: nowrap;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.activity-image-uploader:hover {
    border-color: #ba7600;
    background: #ebf8ff;
    color: #007cba;
}

.add-image-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.uploaded-images-preview,
.edit-uploaded-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    min-height: 50px;
}

.uploaded-image-item {
    position: relative;
    display: inline-block;
}

.uploaded-image-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #cbd5e0;
    transition: all 0.2s ease;
}

.uploaded-image-item:hover .uploaded-image-preview {
    border-color: #007cba;
    transform: scale(1.03);
}

.remove-uploaded-image {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: 1px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-uploaded-image:hover {
    background: #c82333;
    transform: scale(1.1);
}

.uploaded-images-preview:empty::before,
.edit-uploaded-images-preview:empty::before {
    content: "No images uploaded yet. Click 'Upload Image' to add images.";
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
    display: block;
    text-align: center;
    padding: 15px;
    width: 100%;
}

/* Ensure template forms are always visible when active */
#scrambler-form,
#edit-scrambler-form,
#imagepuzzles-form,
#edit-imagepuzzles-form {
    display: block ;
    visibility: visible ;
    opacity: 1 ;
}

.template-form[style*="display: block"] {
    display: block ;
    visibility: visible ;
    opacity: 1 ;
}

/* Ensure all child elements of template forms are visible */
.template-form .form-group,
.template-form .image-upload-row,
.template-form .scrambler-images-container,
.template-form .imagepuzzles-images-container,
.template-form .edit-scrambler-images-container,
.template-form .edit-imagepuzzles-images-container {
    display: block ;
    visibility: visible ;
    opacity: 1 ;
}

.activity-image-uploader.uploading {
    opacity: 0.6;
    pointer-events: none;
}

.add-image-btn:hover {
    background-color: #28a745;
    border-color: #28a745;
}

/* Modal Notification Styles */
/* Enhanced Notification Modal System */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-modal.show {
    opacity: 1;
    visibility: visible;
}

.notification-modal-content {
    background: white;
    color: #2c3e50;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}

.notification-modal.show .notification-modal-content {
    transform: scale(1);
}

/* Enhanced notification container styling */
.notification-container {
    background-color: #f7f7f7;
    font-size: 0.9rem;
    padding: 1.2rem;
    position: relative;
    border-radius: 12px;
    margin: 0;
}

.notification-container.bar-visible {
    padding-left: 1.575rem;
}

.notification-container.hover {
    cursor: pointer;
}

.notification-container .status-bar {
    bottom: 0;
    height: 100%;
    left: 0;
    position: absolute;
    width: 0.375rem;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.notification-container .status-bar.done,
.notification-container .status-bar.success {
    background-color: #28a745;
}

.notification-container .status-bar.error,
.notification-container .status-bar.stalled {
    background-color: #f6a623;
}

.notification-container .status-bar.warning {
    background-color: #ffc107;
}

.notification-container .status-bar.info {
    background-color: #17a2b8;
}

.notification-container .status-bar.cancelled {
    background-color: #b7b7b7;
}

.notification-container .status-icon {
    height: 1.5rem;
    margin-right: 1rem;
    width: 2rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.notification-container .status-icon.warning {
    margin-left: -0.3rem;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGNkE2MjMiIGN4PSIxMi4yOTUiIGN5PSIxMi4yOTUiIHI9IjEyLjI5NSIvPjxwYXRoIGQ9Ik0xMi4yOTUgMTcuNjc0YTEuMTUgMS4xNSAwIDAgMS0xLjE1My0xLjE1MiAxLjE1IDEuMTUgMCAwIDEgMS4xNTMtMS4xNTMgMS4xNSAxLjE1IDAgMCAxIDEuMTUzIDEuMTUzIDEuMTUgMS4xNSAwIDAgMS0xLjE1MyAxLjE1MnptMC00LjYxYTEuMTU5IDEuMTU5IDAgMCAxLTEuMTUzLTEuMTU3VjguMDcyYTEuMTUyIDEuMTUyIDAgMSAxIDIuMzA2IDB2My44MzVjMCAuNjM5LS41MTIgMS4xNTctMS4xNTMgMS4xNTd6IiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==");
}

.notification-container .status-icon.warning-large {
    margin-bottom: -1.5rem;
}

.notification-container .status-icon.checkmark,
.notification-container .status-icon.success {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTEuMiA5LjIzIDQuOTkgNC43MDJMMTQuNCAxLjgiIHN0cm9rZS13aWR0aD0iMi40IiBzdHJva2U9IiM3QkI5NDciIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==");
    height: 1.2rem;
    margin-left: -0.3rem;
}

.notification-container .status-icon.error {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNkYzM1NDUiIGN4PSIxMi4yOTUiIGN5PSIxMi4yOTUiIHI9IjEyLjI5NSIvPjxwYXRoIGQ9Ik0xNi40MyA4LjI5NSAxMy4xMzUgMTEuNTlsLTAuODQgMC44NEwxNi40MjUgMTYuNTZsLTIuODM1IDIuODM1LTQuMTMtNC4xM0w5LjI5NSA5LjEzNWwzLjI5NS0zLjI5NXoiIGZpbGw9IiNGRkYiLz48L2c+PC9zdmc+");
    color: #dc3545;
}

.notification-container .status-icon.info {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiMxN2EyYjgiIGN4PSIxMi4yOTUiIGN5PSIxMi4yOTUiIHI9IjEyLjI5NSIvPjx0ZXh0IGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxOCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IiNGRkYiPjx0c3BhbiB4PSI5LjUiIHk9IjE4Ij5pPC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==");
}

.notification-container .stalled {
    color: #f6a623;
}

.notification-container .info {
    position: relative;
    width: 100%;
}

.notification-container .info .info-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.notification-container .info .info-wrap .title {
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    line-height: 1.3;
}

.notification-container .info .info-wrap .subtitle {
    color: #929292;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

.notification-container .info .info-wrap .subtitle.spaced {
    margin-left: 43px;
}

.notification-container .info .info-wrap .status-wrap {
    display: flex;
    margin-left: auto;
}

.notification-container .info .status {
    color: #4d4d4d;
    font-weight: 700;
    text-transform: capitalize;
}

.notification-container .info .stalled {
    color: #f6a623;
    cursor: pointer;
}

.notification-container .file-actions,
.notification-modal-footer {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.notification-container .file-actions .button,
.notification-modal-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 80px;
    flex: 1 1 auto;
    font-weight: 700;
    height: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-container .file-actions .button:first-child {
    margin-right: 0.6rem;
}

.notification-container .file-actions .button:last-child {
    margin-left: 0.6rem;
}

.notification-modal-btn:hover,
.notification-container .file-actions .button:hover {
    background-color: #005a8a;
}

.notification-container .error-container {
    padding-left: 3rem;
}

.notification-container .error-container .error-collapsed .error-type {
    color: #f6a623;
    font-weight: 900;
    margin: 0 -1rem 0 -4rem;
    padding: 0.5rem 1rem 0 3.6rem;
    width: 100%;
}

.notification-container .error-container .error-collapsed .inverted {
    color: #f6a623;
    margin-top: 0.5rem;
}

.notification-container .error-container .error-expanded,
.notification-container .error-container .info-expanded {
    width: 100%;
}

.notification-container .error-container .error-expanded .error-message,
.notification-container .error-container .info-expanded .error-message {
    color: #4d4d4d;
    margin: 1rem 0;
}

.notification-container .error-container .error-expanded .error-message hr,
.notification-container .error-container .info-expanded .error-message hr {
    border: none;
    margin: 0 0 1rem;
}

.notification-container .error-container .error-expanded .error-code,
.notification-container .error-container .info-expanded .error-code {
    color: #929292;
}

.notification-container .action {
    cursor: pointer;
    display: inline-block;
    height: 1rem;
    margin-left: 1rem;
    width: 1rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.notification-container .action.cancel {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBjbGFzcz0iY3Jvc3MiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTEyLjQgMS4zNTMgMTEuMTkzLjE0NSA2LjQwMSA0LjkzNiAxLjYwOS4xNDUuNDAxIDEuMzUzbDQuNzkxIDQuNzkyLTQuNzkxIDQuNzkxIDEuMjA4IDEuMjA5IDQuNzkyLTQuNzkyIDQuNzkxIDQuNzkyIDEuMjA5LTEuMjA5LTQuNzkyLTQuNzkxeiIgZmlsbD0iIzdBOEI5OSIvPjxwYXRoIGQ9Ik0tMjAtMjAuMjU1aDUyLjh2NTIuOEgtMjB6Ii8+PC9nPjwvc3ZnPg==");
}

.notification-container .action.cancel:hover {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjMTU5QkQ5IiBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik0xMi40IDEuMzUzIDExLjE5My4xNDUgNi40MDEgNC45MzYgMS42MDkuMTQ1LjQwMSAxLjM1M2w0Ljc5MSA0Ljc5Mi00Ljc5MSA0Ljc5MSAxLjIwOCAxLjIwOSA0Ljc5Mi00Ljc5MiA0Ljc5MSA0Ljc5MiAxLjIwOS0xLjIwOS00Ljc5Mi00Ljc5MXoiLz48cGF0aCBkPSJNLTIwLTIwLjI1NWg1Mi44djUyLjhILTIweiIvPjwvZz48L3N2Zz4=");
}

.notification-modal-close {
    display: none !important;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #030303 !important;
    cursor: pointer;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 1;
    line-height: 1;
}

.notification-modal-close:hover {
    background-color: #e63b03 !important;
    color: #495057;
}

/* Type-specific styling */
.notification-modal.success .notification-container .status-bar {
    background-color: #28a745;
}

.notification-modal.error .notification-container .status-bar {
    background-color: #dc3545;
}

.notification-modal.warning .notification-container .status-bar {
    background-color: #ffc107;
}

.notification-modal.info .notification-container .status-bar {
    background-color: #17a2b8;
}

.notification-modal.success .notification-container .info .info-wrap .title {
    color: #28a745;
}

.notification-modal.error .notification-container .info .info-wrap .title {
    color: #dc3545;
}

.notification-modal.warning .notification-container .info .info-wrap .title {
    color: #f57c00;
}

.notification-modal.info .notification-container .info .info-wrap .title {
    color: #17a2b8;
}

.notification-modal-btn:hover {
    background: #0056b3;
}

.notification-modal-btn.secondary {
    background: #6c757d;
}

.notification-modal-btn.secondary:hover {
    background: #545b62;
}

.notification-modal-btn.success {
    background: #28a745;
}

.notification-modal-btn.success:hover {
    background: #1e7e34;
}

.notification-modal-btn.error {
    background: #dc3545;
}

.notification-modal-btn.error:hover {
    background: #c82333;
}

.notification-modal-btn.warning {
    background: #ffc107;
    color: #212529;
}

.notification-modal-btn.warning:hover {
    background: #e0a800;
}



/* Mobile responsive notifications */
@media (max-width: 480px) {
    .notification-modal-content {
        width: 95%;
        margin: 10px;
        padding: 20px;
    }
    
    .notification-modal-header {
        gap: 12px;
    }
    
    .notification-modal-title {
        font-size: 16px;
    }
    
    .notification-modal-message {
        font-size: 14px;
    }
    
    .notification-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .notification-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Flashcards Form Styling */
.flashcards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.flashcard-pair {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.flashcard-pair:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.1);
}

.flashcard-pair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.flashcard-number {
    font-weight: 600;
    color: #007cba;
    font-size: 16px;
}

.flashcard-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .flashcard-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.flashcard-inputs .form-group {
    margin-bottom: 0;
}

.flashcard-inputs .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.flashcard-question,
.flashcard-answer {
    resize: vertical;
    min-height: 60px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.3s ease;
}

.flashcard-question:focus,
.flashcard-answer:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
    outline: none;
}

#add-flashcard-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
    width: auto;
    min-width: auto;
}

#add-flashcard-btn:hover {
    background: #005a8b;
}

#add-flashcard-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Pixabay Integration Styles */
.pixabay-search-button {
    margin-left: 10px ;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) ;
    color: white ;
    border: none ;
    transition: transform 0.2s ease ;
}

.pixabay-search-button:hover {
    transform: translateY(-1px) ;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4) ;
}

.background-image-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.option-button {
    flex: 1;
    padding: 15px 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.option-button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.option-icon {
    font-size: 20px;
}

.option-text {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

/* Pixabay Modal Styles */
#pixabay-search-modal .modal-content {
    max-width: 900px ;
    max-height: 90vh ;
}

.pixabay-search-controls {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-input-group button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-filters select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.search-filters label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.pixabay-results-grid {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.pixabay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.pixabay-image-item {
    position: relative;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pixabay-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pixabay-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.pixabay-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px 10px 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pixabay-image-item:hover .pixabay-overlay {
    opacity: 1;
}

.pixabay-tags {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pixabay-user {
    font-size: 10px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.pixabay-select-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CRITICAL WORDPRESS THEME OVERRIDE SECTION */
/* These styles are designed to override any WordPress theme that might be interfering with button visibility */

/* Force all plugin buttons to be visible with proper colors */
.activity-creator-container .btn,
.activity-creator-container button:not(.wp-block-button__link),
.activity-creator-container input[type="button"],
.activity-creator-container input[type="submit"],
.activity-modal .btn,
.activity-modal button:not(.wp-block-button__link),
.activity-modal input[type="button"],
.activity-modal input[type="submit"],
.modal-content .btn,
.modal-content button:not(.wp-block-button__link),
.modal-content input[type="button"],
.modal-content input[type="submit"],
.wizard-content .btn,
.wizard-content button:not(.wp-block-button__link),
.notification-modal .btn,
.notification-modal button:not(.wp-block-button__link) {
    /* Reset and force proper button styling */
    all: unset ;
    /* Apply our button styles */
    display: inline-block ;
    background: #007cba ;
    color: white ;
    border: 1px solid #007cba ;
    padding: 8px 16px ;
    border-radius: 6px ;
    font-size: 14px ;
    font-weight: 500 ;
    cursor: pointer ;
    text-align: center ;
    text-decoration: none ;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ;
    box-sizing: border-box ;
    transition: all 0.2s ease ;
    line-height: normal ;
    white-space: nowrap ;
    vertical-align: baseline ;
    user-select: none ;
    appearance: none ;
    -webkit-appearance: none ;
    -moz-appearance: none ;
    outline: none ;
    box-shadow: none ;
    text-shadow: none ;
    position: relative ;
    z-index: 1 ;
    opacity: 1 ;
    visibility: visible ;
    width: auto ;
    min-width: auto ;
    height: auto ;
    min-height: auto ;
}

/* Button hover states */
.activity-creator-container .btn:hover,
.activity-creator-container button:hover:not(.wp-block-button__link),
.activity-modal .btn:hover,
.activity-modal button:hover:not(.wp-block-button__link),
.modal-content .btn:hover,
.modal-content button:hover:not(.wp-block-button__link),
.wizard-content .btn:hover,
.notification-modal .btn:hover,
.notification-modal button:hover:not(.wp-block-button__link) {
    background: #005a87 ;
    color: white ;
    border-color: #005a87 ;
    transform: translateY(-1px) ;
}

/* Secondary buttons */
.activity-creator-container .btn-secondary,
.activity-creator-container button.btn-secondary,
.activity-modal .btn-secondary,
.modal-content .btn-secondary,
.wizard-content .btn-secondary,
.notification-modal .btn-secondary {
    background: #6c757d ;
    color: white ;
    border-color: #6c757d ;
}

.activity-creator-container .btn-secondary:hover,
.activity-creator-container button.btn-secondary:hover,
.activity-modal .btn-secondary:hover,
.modal-content .btn-secondary:hover,
.wizard-content .btn-secondary:hover,
.notification-modal .btn-secondary:hover {
    background: #545b62 ;
    color: white ;
    border-color: #545b62 ;
}

/* Danger buttons */
.activity-creator-container .btn-danger,
.activity-creator-container button.btn-danger,
.activity-modal .btn-danger,
.modal-content .btn-danger,
.wizard-content .btn-danger,
.notification-modal .btn-danger {
    background: #dc3545 ;
    color: white ;
    border-color: #dc3545 ;
}

.activity-creator-container .btn-danger:hover,
.activity-creator-container button.btn-danger:hover,
.activity-modal .btn-danger:hover,
.modal-content .btn-danger:hover,
.wizard-content .btn-danger:hover,
.notification-modal .btn-danger:hover {
    background: #c82333 ;
    color: white ;
    border-color: #c82333 ;
}

/* Success buttons */
.activity-creator-container .btn-success,
.activity-creator-container button.btn-success,
.activity-modal .btn-success,
.modal-content .btn-success,
.wizard-content .btn-success,
.notification-modal .btn-success {
    background: #28a745 ;
    color: white ;
    border-color: #28a745 ;
}

.activity-creator-container .btn-success:hover,
.activity-creator-container button.btn-success:hover,
.activity-modal .btn-success:hover,
.modal-content .btn-success:hover,
.wizard-content .btn-success:hover,
.notification-modal .btn-success:hover {
    background: #1e7e34 ;
    color: white ;
    border-color: #1e7e34 ;
}

/* Force all text in plugin to be readable */
.activity-creator-container,
.activity-creator-container *:not(button):not(.btn),
.activity-modal,
.activity-modal *:not(button):not(.btn),
.modal-content,
.modal-content *:not(button):not(.btn),
.wizard-content,
.wizard-content *:not(button):not(.btn),
.notification-modal,
.notification-modal *:not(button):not(.btn) {
    color: #333 ;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ;
}

/* Force form elements to be readable */
.activity-creator-container input:not([type="button"]):not([type="submit"]),
.activity-creator-container textarea,
.activity-creator-container select,
.activity-modal input:not([type="button"]):not([type="submit"]),
.activity-modal textarea,
.activity-modal select,
.modal-content input:not([type="button"]):not([type="submit"]),
.modal-content textarea,
.modal-content select {
    background: white ;
    color: #333 ;
    border: 1px solid #ccc ;
    padding: 10px ;
    border-radius: 4px ;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ;
}

/* Ensure container creates proper isolation */
.activity-creator-container {
    position: relative ;
    z-index: 1 ;
    background: transparent ;
    color: #333 ;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ;
    line-height: 1.5 ;
    font-size: 14px ;
}

/* Extra specificity for problematic themes */
body .activity-creator-container .btn,
body .activity-creator-container button:not(.wp-block-button__link),
div .activity-creator-container .btn,
div .activity-creator-container button:not(.wp-block-button__link) {
    background: #007cba ;
    color: white ;
    border: 1px solid #007cba ;
    padding: 8px 16px ;
    border-radius: 6px ;
    font-size: 14px ;
    cursor: pointer ;
    display: inline-block ;
}

/* Mobile adjustments for buttons */
@media (max-width: 768px) {
    .activity-creator-container .btn,
    .activity-creator-container button,
    .activity-modal .btn,
    .activity-modal button,
    .modal-content .btn,
    .modal-content button {
        padding: 6px 12px ;
        font-size: 13px ;
        min-height: 32px ;
    }
}

/* Even more aggressive overrides for themes that use deep selectors */
html .activity-creator-container .btn,
html .activity-creator-container button:not(.wp-block-button__link),
html .activity-modal .btn,
html .activity-modal button:not(.wp-block-button__link),
html .modal-content .btn,
html .modal-content button:not(.wp-block-button__link) {
    background-color: #007cba ;
    color: white ;
    border-color: #007cba ;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ;
    opacity: 1 ;
    visibility: visible ;
}

/* Last resort - if theme uses body selectors */
html body .activity-creator-container .btn,
html body .activity-creator-container button:not(.wp-block-button__link) {
    background: #007cba ;
    color: white ;
    visibility: visible ;
    opacity: 1 ;
}

/* Duck Game Specific Styles */
.duckgame-container .duckgame-item {
    margin-bottom: 20px;
}

.duckgame-item.group1 {
    border-left: 4px solid #007cba;
}

.duckgame-item.group2 {
    border-left: 4px solid #28a745;
}

.duckgame-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.duckgame-item-label {
    font-weight: bold;
    font-size: 16px;
}

.duckgame-item.group1 .duckgame-item-label {
    color: #007cba;
}

.duckgame-item.group2 .duckgame-item-label {
    color: #28a745;
}

.duckgame-item-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.duckgame-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.duckgame-image-btn {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.duckgame-image-btn:hover {
    background: #545b62 !important;
}

/* Standard Remove Button Style */
.remove-btn {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: auto;
}

.remove-btn:hover {
    background: #c82333 !important;
    transform: scale(1.05);
}

/* Group name inputs */
#duck-group1-name,
#duck-group2-name {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#duck-group1-name:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

#duck-group2-name:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* Add item buttons */
#add-duckgame-item-group1-btn {
    background: #007cba !important;
    color: white !important;
    border: none !important;
}

#add-duckgame-item-group1-btn:hover {
    background: #005a87 !important;
}

#add-duckgame-item-group2-btn {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
}

#add-duckgame-item-group2-btn:hover {
    background: #1e7e34 !important;
}

/* Duck game validation styling */
.duckgame-item.invalid {
    border-left: 4px solid #dc3545;
}

.duckgame-item.invalid .duckgame-item-label {
    color: #dc3545;
}

/* Public Sharing Modal Styles */
#public-sharing-modal .modal-content {
    max-width: 600px;
}

.sharing-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #007cba;
}

.sharing-info h4 {
    margin-top: 0;
    color: #007cba;
}

.sharing-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.sharing-info li {
    margin-bottom: 8px;
}

.sharing-actions {
    text-align: center;
    margin: 30px 0;
}

.sharing-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.sharing-success h4 {
    color: #155724;
    margin-top: 0;
}

.url-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-container input[readonly] {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.qr-code-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.qr-code-container img {
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.sharing-management {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.sharing-loading {
    text-align: center;
    padding: 40px;
}

.sharing-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn.copied {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

/* Cross-browser button reset for consistent styling */
.activity-creator-container button,
.activity-creator-container .btn,
.activity-modal button,
.activity-modal .btn,
.modal-content button,
.modal-content .btn,
.wizard-content button,
.wizard-content .btn,
.activity-menu-item,
.activity-menu-trigger {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    font-family: inherit !important;
    font-weight: normal !important;
    text-decoration: none !important;
    outline: none !important;
    border-style: solid !important;
}

/* Ensure menu items specifically have white background */
.activity-menu-item {
    background-color: white !important;
    color: #2c3e50 !important;
    border: none !important;
}

.activity-menu-item:focus,
.activity-menu-item:active {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
    outline: none !important;
}

/* Override any Chrome/Webkit specific button styling */
.activity-creator-container button:not(.wp-block-button__link),
.activity-modal button:not(.wp-block-button__link),
.modal-content button:not(.wp-block-button__link) {
    background-image: none !important;
    border-radius: inherit !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Activity card share button */
.activity-menu-item.share-activity {
    color: #007cba;
}

.activity-menu-item.share-activity:hover {
    background: #e3f2fd;
}


