/* ========================================
   AI Auto Tool - Single Post Modern Design
   ======================================== */

/* Modern Header */
.aiautotool-modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    animation: fadeInDown 0.6s ease-out;
}

.aiautotool-modern-header img {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
    animation: pulse 2s ease-in-out infinite;
}

.aiautotool-modern-header h1 {
    color: white;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Container Layout */
.aiautotool_container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.aiautotool_left {
    width: 100%;
}

/* Box Styles */
.aiautotool_box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.aiautotool_box:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.aiautotool_box_head {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: none;
}

.aiautotool_box_head img {
    filter: brightness(0) invert(1);
    width: 24px;
    height: 24px;
}

.aiautotool_box_content {
    padding: 30px;
}

/* Form Styles */
.aiautotool-form-group {
    margin-bottom: 25px;
    animation: fadeIn 0.4s ease-out;
}

.aiautotool-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.aiautotool-form-label i {
    color: #667eea;
    font-size: 16px;
}

.aiautotool-input,
.aiautotool-select,
.ft-input-big {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.aiautotool-input:focus,
.aiautotool-select:focus,
.ft-input-big:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.aiautotool-select {
    cursor: pointer;
}

/* Categories */
.aiautotool_categories {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.aiautotool_categories:hover {
    border-color: #667eea;
}

.aiautotool_categories::-webkit-scrollbar {
    width: 8px;
}

.aiautotool_categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.aiautotool_categories::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.aiautotool_categories::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Thumbnail Upload */
#custom-thumbnail-preview {
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

#custom-thumbnail-preview:hover {
    border-color: #667eea;
    background: white;
}

#custom-thumbnail-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#upload-custom-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#upload-custom-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Right Sidebar */
.aiautotool_right {
    width: 100%;
}

.aiautotool-fixed {
    position: sticky;
    top: 32px;
}

.aiautotool_navpublic {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    animation: fadeInRight 0.6s ease-out;
}

.aiautotool_navpublic label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
    font-size: 14px;
}

.publish-date-time-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.aiautotool_box_time_select,
.aiautotool_box_time_input {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.aiautotool_box_time_select:focus,
.aiautotool_box_time_input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Publish Button */
.save-single-generation {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.save-single-generation:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.save-single-generation:active {
    transform: translateY(0);
}

.save-single-generation:before {
    content: "\f0c7";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
}

/* AI Assistant Box */
#aiautotool-meta-box .aiautotool_box_head {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.askassistant {
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.askassistant textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.askassistant textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.select-and-button {
    display: flex;
    gap: 10px;
}

.select-and-button select,
.select-and-button select.aiautotool-ai-select,
.aiautotool-ai-select {
    flex: 1;
    padding: 12px 36px 12px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4.5 6L8 9.5L11.5 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.select-and-button select:focus,
.select-and-button select.aiautotool-ai-select:focus,
.aiautotool-ai-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.select-and-button button {
    flex: 2;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.select-and-button button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Tabs */
.aiautotool_tab {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #f9fafb;
    padding: 8px;
    border-radius: 8px;
}

.aiautotool_tab button {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.aiautotool_tab button:hover {
    background: white;
    color: #667eea;
}

.aiautotool_tab button.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tabcontent {
    padding: 20px;
    background: white;
    border-radius: 8px;
    min-height: 200px;
}

.infodiv {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

.infodiv p {
    margin: 10px 0;
}

.infodiv img {
    opacity: 0.6;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.infodiv:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* Loading States */
.loader {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Button Styles */
.aiautotool_button,
.btnaddpost {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
}

.aiautotool_button:hover,
.btnaddpost:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Separator */
hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 25px 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1280px) {
    .aiautotool_container {
        grid-template-columns: 1fr;
    }
    
    .aiautotool-fixed {
        position: relative;
        top: 0;
    }
    
    .aiautotool-modern-header {
        padding: 20px;
    }
    
    .aiautotool-modern-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .aiautotool_container {
        padding: 0 10px;
    }
    
    .aiautotool_box_content {
        padding: 20px;
    }
    
    .aiautotool_navpublic {
        padding: 20px;
    }
    
    .publish-date-time-row {
        grid-template-columns: 1fr;
    }
    
    .select-and-button {
        flex-direction: column;
    }
    
    .select-and-button select,
    .select-and-button button {
        width: 100%;
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-soft-primary {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Helper Classes */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

.p-5 {
    padding: 3rem;
}

.pt-5 {
    padding-top: 3rem;
}

/* Image List */
.img_list_find {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.img_list_find img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.img_list_find img:hover {
    transform: scale(1.05);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Success/Error States */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease-out;
}

.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease-out;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    animation: fadeIn 0.2s ease-out;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
}


