/* AI Membership - Frontend Styles */

:root {
    --ai-primary-color: #2563eb;
    --ai-primary-hover: #1d4ed8;
    --ai-danger-color: #dc2626;
    --ai-danger-hover: #b91c1c;
    --ai-success-color: #16a34a;
    --ai-warning-color: #f59e0b;
    --ai-text-color: #1f2937;
    --ai-text-light: #6b7280;
    --ai-border-color: #e5e7eb;
    --ai-bg-light: #f9fafb;
    --ai-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --ai-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Container */
.ai-membership-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Card Layout - Similar to screenshot */
.ai-membership-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--ai-shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ai-membership-card-header {
    margin-bottom: 2rem;
}

.ai-membership-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ai-text-color);
    margin: 0 0 0.5rem 0;
}

.ai-membership-card-subtitle {
    font-size: 0.875rem;
    color: var(--ai-text-light);
    margin: 0;
}

/* Notice Boxes */
.ai-membership-notice {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.ai-membership-notice-success {
    background-color: #f0fdf4;
    border-color: var(--ai-success-color);
    color: #166534;
}

.ai-membership-notice-error {
    background-color: #fef2f2;
    border-color: var(--ai-danger-color);
    color: #991b1b;
}

.ai-membership-notice-warning {
    background-color: #fffbeb;
    border-color: var(--ai-warning-color);
    color: #92400e;
}

.ai-membership-notice p {
    margin: 0;
}

/* Form Elements */
.ai-membership-form {
    max-width: 100%;
}

.ai-membership-form-group {
    margin-bottom: 1.5rem;
}

.ai-membership-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ai-text-color);
    margin-bottom: 0.5rem;
}

.ai-membership-form-label.required::after {
    content: ' *';
    color: var(--ai-danger-color);
}

.ai-membership-form-input,
.ai-membership-form-select,
.ai-membership-form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--ai-border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    color: var(--ai-text-color);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ai-membership-form-input:focus,
.ai-membership-form-select:focus,
.ai-membership-form-textarea:focus {
    outline: none;
    border-color: var(--ai-primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ai-membership-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.ai-membership-form-help {
    display: block;
    font-size: 0.8125rem;
    color: var(--ai-text-light);
    margin-top: 0.375rem;
}

/* Checkbox and Radio Groups */
.ai-membership-checkbox-group,
.ai-membership-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-membership-checkbox-item,
.ai-membership-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-membership-checkbox-item input[type="checkbox"],
.ai-membership-radio-item input[type="radio"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.ai-membership-checkbox-item label,
.ai-membership-radio-item label {
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--ai-text-color);
}

/* Buttons */
.ai-membership-btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.ai-membership-btn-primary {
    background-color: var(--ai-primary-color);
    color: white;
}

.ai-membership-btn-primary:hover {
    background-color: var(--ai-primary-hover);
    color: white;
}

.ai-membership-btn-secondary {
    background-color: #6b7280;
    color: white;
}

.ai-membership-btn-secondary:hover {
    background-color: #4b5563;
    color: white;
}

.ai-membership-btn-danger {
    background-color: var(--ai-danger-color);
    color: white;
}

.ai-membership-btn-danger:hover {
    background-color: var(--ai-danger-hover);
    color: white;
}

.ai-membership-btn-block {
    display: block;
    width: 100%;
}

.ai-membership-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Grid Layout */
.ai-membership-grid {
    display: grid;
    gap: 1.5rem;
}

.ai-membership-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ai-membership-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Tool Cards */
.ai-tool-card {
    background: white;
    border: 1px solid var(--ai-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.ai-tool-card:hover {
    box-shadow: var(--ai-shadow-lg);
    border-color: var(--ai-primary-color);
}

.ai-tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.ai-tool-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ai-text-color);
    margin: 0;
}

.ai-tool-card-category {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background-color: var(--ai-bg-light);
    color: var(--ai-text-light);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
}

.ai-tool-card-description {
    color: var(--ai-text-light);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.ai-tool-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ai-tool-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    border-radius: 4px;
}

.ai-tool-card-reason {
    font-size: 0.875rem;
    color: var(--ai-success-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.ai-tool-card-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ai-tool-card-footer .ai-membership-btn {
    flex: 1;
}

.ai-tool-price-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    text-transform: capitalize;
}

.ai-tool-price-badge.paid {
    background-color: #fef3c7;
    color: #92400e;
}

/* Save Button States */
.ai-save-btn.saved {
    background-color: var(--ai-success-color) !important;
}

.ai-save-btn.saved:hover {
    background-color: #15803d !important;
}

/* Dashboard Stats */
.ai-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ai-stat-card {
    background: white;
    border: 1px solid var(--ai-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.ai-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ai-primary-color);
    margin-bottom: 0.5rem;
}

.ai-stat-label {
    font-size: 0.875rem;
    color: var(--ai-text-light);
}

/* Profile Avatar */
.ai-profile-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--ai-primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}

/* Empty State */
.ai-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.ai-empty-state-icon {
    font-size: 3rem;
    color: var(--ai-text-light);
    margin-bottom: 1rem;
}

.ai-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ai-text-color);
    margin-bottom: 0.5rem;
}

.ai-empty-state-description {
    color: var(--ai-text-light);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-membership-card {
        padding: 1.5rem;
    }
    
    .ai-membership-grid-2,
    .ai-membership-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .ai-tool-card-footer {
        flex-direction: column;
    }
}

/* Loading State */
.ai-membership-loading {
    text-align: center;
    padding: 2rem;
}

.ai-membership-spinner {
    border: 3px solid var(--ai-border-color);
    border-top: 3px solid var(--ai-primary-color);
    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); }
}

/* Action Links */
.ai-action-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.ai-action-links a {
    color: var(--ai-primary-color);
    text-decoration: none;
    font-size: 0.9375rem;
}

.ai-action-links a:hover {
    text-decoration: underline;
}

/* ================================================
   SUBMIT TOOL PAGE STYLES
   Inspired by OpenTools.ai design
   ================================================ */

.ai-submit-tool-wrapper {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Success Banner */
.ai-submit-success-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 0 auto 2rem;
    max-width: 800px;
    text-align: center;
    animation: slideDown 0.5s ease-out;
}

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

.ai-submit-success-banner .ai-submit-success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.ai-submit-success-banner h2 {
    color: white;
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
}

.ai-submit-success-banner p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 1.1rem;
}

/* Hero Section */
.ai-submit-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem 1rem;
}

.ai-submit-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.ai-submit-hero-highlight {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-submit-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
}

.ai-submit-highlight-text {
    color: #818cf8;
    font-weight: 600;
}

/* Main Grid Layout */
.ai-submit-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 900px) {
    .ai-submit-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Benefits Column */
.ai-submit-benefits-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ai-submit-benefits-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
}

.ai-submit-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.ai-submit-section-title--green {
    color: #34d399;
}

.ai-submit-section-title--purple {
    color: #a78bfa;
}

/* Benefits List */
.ai-submit-benefits-list,
.ai-submit-stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-submit-benefits-list li,
.ai-submit-stats-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.ai-submit-benefits-list li:last-child,
.ai-submit-stats-list li:last-child {
    margin-bottom: 0;
}

.ai-benefit-icon {
    color: #34d399;
    font-weight: bold;
    flex-shrink: 0;
}

.ai-stat-bullet {
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.ai-submit-stats-list strong {
    color: white;
}

/* Form Column */
.ai-submit-form-column {
    position: sticky;
    top: 2rem;
}

.ai-submit-form-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.ai-submit-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem;
    text-align: center;
}

/* Form Elements */
.ai-submit-form-group {
    margin-bottom: 1rem;
}

.ai-submit-input,
.ai-submit-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #1f2937;
    transition: all 0.2s ease;
    background: #f9fafb;
    box-sizing: border-box;
}

.ai-submit-input:focus,
.ai-submit-textarea:focus {
    outline: none;
    border-color: #818cf8;
    background: white;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.ai-submit-input::placeholder,
.ai-submit-textarea::placeholder {
    color: #9ca3af;
}

.ai-submit-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Package Selection */
.ai-submit-packages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ai-submit-package-option {
    display: block;
    cursor: pointer;
    position: relative;
}

.ai-submit-package-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ai-submit-package-content {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.ai-submit-package-option input:checked + .ai-submit-package-content {
    border-color: #818cf8;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.ai-submit-package-option--premium .ai-submit-package-content {
    border-color: #818cf8;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
}

.ai-submit-package-option--premium input:checked + .ai-submit-package-content {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.ai-submit-package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ai-submit-package-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.ai-submit-package-price {
    font-weight: 700;
    color: #6366f1;
    font-size: 1.125rem;
}

.ai-submit-package-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.ai-submit-package-features li {
    color: #4b5563;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ai-submit-package-features li:last-child {
    margin-bottom: 0;
}

.ai-pkg-check {
    color: #10b981;
    font-weight: bold;
}

.ai-pkg-x {
    color: #ef4444;
}

.ai-pkg-excluded {
    color: #9ca3af !important;
    text-decoration: line-through;
}

/* Social Boost Option */
.ai-submit-boost-option {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}

.ai-submit-checkbox-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

.ai-submit-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.ai-submit-social-link {
    color: #2563eb;
    text-decoration: underline;
}

.ai-submit-social-count {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Submit Button */
.ai-submit-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ai-submit-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.ai-submit-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.ai-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Alternative Actions */
.ai-submit-alt-actions {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.ai-submit-link {
    color: #2563eb;
    text-decoration: none;
}

.ai-submit-link:hover {
    text-decoration: underline;
}

.ai-submit-separator {
    color: #d1d5db;
    margin: 0 0.5rem;
}

/* Trust Section */
.ai-submit-trust-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.ai-submit-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.ai-submit-trust-icon {
    font-size: 1.5rem;
}

.ai-submit-trust-avatars {
    display: flex;
}

.ai-submit-trust-avatars .ai-avatar {
    width: 28px;
    height: 28px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-left: -8px;
    border: 2px solid white;
}

.ai-submit-trust-avatars .ai-avatar:first-child {
    margin-left: 0;
}

.ai-submit-trust-text {
    font-size: 0.8rem;
    color: #6b7280;
}

.ai-submit-trust-text strong {
    display: block;
    color: #1f2937;
    font-size: 0.9rem;
}

.ai-submit-trust-stars {
    color: #fbbf24;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ai-submit-tool-wrapper {
        padding: 1rem;
    }
    
    .ai-submit-form-card {
        padding: 1.5rem;
    }
    
    .ai-submit-trust-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ai-submit-package-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
