/**
 * AI Share URL Generator Styles
 */

/* Template Buttons */
.template-btn {
    display: inline-block;
    background: #f5f5f5;
    color: #333;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.template-btn:hover {
    background: #219653;
    color: white;
    transform: translateY(-1px);
}

.template-btn.active {
    background: #219653 !important;
    border-color: #219653 !important;
    color: white;
}

/* Platform Links Styling */
.platform-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border: 1px solid #e4e8ec;
}

.platform-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

/* Preview Container */
#preview-container {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

#preview-container.has-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-style: solid;
}

#preview-container a {
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

#preview-container a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

#preview-container .empty-state {
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}

/* Color Picker Styling */
input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366F1;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #5046E5;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366F1;
    cursor: pointer;
    border: 2px solid white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-moz-range-thumb:hover {
    background: #5046E5;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    border: none;
}

/* UTM Toggle Styling */
#utm-toggle {
    text-align: left;
    color: #333;
}

#utm-arrow {
    transition: transform 0.2s ease;
    display: inline-block;
    margin-left: 5px;
}

#utm-toggle.expanded #utm-arrow {
    transform: rotate(180deg);
}

/* Generated Content Styling */
.ai-share-result {
    background: #f9f9f9;
    border: 1px solid #e4e8ec;
    border-radius: 4px;
    padding: 16px;
    position: relative;
}

.ai-share-result h6 {
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.ai-share-url {
    font-family: monospace;
    font-size: 11px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    word-break: break-all;
    line-height: 1.4;
}

.platform-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-actions a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.copy-button {
    font-size: 12px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #e5e5e5;
}

/* Color Palette Styling */
.color-palette {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    border-color: #999;
}

.color-option.active {
    border-color: #333;
    transform: scale(1.1);
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #219653;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .template-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .checkbox-container {
        margin-bottom: 8px;
    }
}

input[type="range"] {
  accent-color: #3e86f8; /* Example: Blue */
}

/* Webkit browsers */
input[type="range"]::-webkit-slider-thumb {
  background-color: #3e86f8; /* Example: Red thumb */
}

/* Focus indicators for accessibility */
/*button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #219653;
    outline-offset: 2px;
}*/

/* Accessibility Improvements */
/*@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}*/
