/* Share Garage Modal Styles - Premium glass morphism design */

/* ============================================
   MODAL CONTAINER & STRUCTURE
   ============================================ */

.share-garage-modal {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.share-modal-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    padding: 2rem;
}

.modal-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-modal-header .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(139, 92, 246, 1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.share-modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.share-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(100, 116, 139, 0.25);
    justify-content: flex-end;
}

/* ============================================
   SECTIONS & HEADERS
   ============================================ */

.share-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.badge-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 100%);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-inactive {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.15) 100%);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ============================================
   SHARE LINK SECTION
   ============================================ */

.share-link-section {
    background: rgba(14, 22, 36, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Empty State */
.share-link-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.share-link-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Share Link Display */
.share-link-display {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.share-link-container {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.share-link-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: rgba(14, 22, 36, 0.7);
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    transition: all 0.2s ease;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.btn-copy:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.25) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy.copy-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.copy-icon {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.btn-copy:hover .copy-icon {
    transform: scale(1.1);
}

/* Share Actions */
.share-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.share-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.share-action-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.5rem;
    display: block;
}

.action-text {
    display: block;
    white-space: nowrap;
}

/* Share Link Hint */
.share-link-hint {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    animation: slideDown 0.3s ease-out;
}

.hint-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

/* Loading Placeholder */
.share-link-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    height: 2.5rem;
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.2) 0%, rgba(100, 116, 139, 0.4) 50%, rgba(100, 116, 139, 0.2) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton-short {
    width: 60%;
}

/* ============================================
   PRIVACY SETTINGS SECTION
   ============================================ */

.privacy-section {
    background: rgba(14, 22, 36, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
}

.privacy-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.privacy-option-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(14, 22, 36, 0.5);
    border: 2px solid rgba(100, 116, 139, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.privacy-option-card:hover {
    background: rgba(14, 22, 36, 0.8);
    border-color: rgba(100, 116, 139, 0.4);
    transform: translateY(-2px);
}

.privacy-option-card input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.privacy-option-card input[type="radio"]:checked + .privacy-option-content {
    opacity: 1;
}

.privacy-option-card input[type="radio"]:checked {
    accent-color: var(--accent-blue);
}

.privacy-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.privacy-option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.privacy-icon {
    font-size: 1.25rem;
}

.privacy-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.privacy-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.privacy-option-card:has(input:checked) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Expiration Section */
.expiration-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 116, 139, 0.25);
    animation: slideDown 0.3s ease-out;
}

.expiration-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expiration-date-input {
    padding: 0.875rem 1rem;
    background: rgba(14, 22, 36, 0.7);
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.expiration-date-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.expiration-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================
   STATISTICS SECTION
   ============================================ */

.stats-section {
    background: rgba(14, 22, 36, 0.5);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(14, 22, 36, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
}

.stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   INFO BOX
   ============================================ */

.share-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.info-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-list li {
    margin: 0.25rem 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary.loading {
    opacity: 0.7;
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.15);
    border: 1.5px solid rgba(100, 116, 139, 0.3);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(100, 116, 139, 0.5);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes loading {
    0%, 100% {
        background-position: 200% 0;
    }
    50% {
        background-position: -200% 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .share-garage-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .share-modal-header {
        padding: 1.5rem;
    }

    .share-modal-header .modal-title {
        font-size: 1.5rem;
    }

    .modal-subtitle {
        font-size: 0.85rem;
    }

    .share-modal-body {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .share-modal-footer {
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .share-link-container {
        flex-direction: column;
    }

    .btn-copy {
        min-width: auto;
        width: 100%;
    }

    .share-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn {
        width: 100%;
    }

    .share-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .share-garage-modal {
        max-height: 90vh;
    }

    .share-modal-header {
        padding: 1.25rem;
    }

    .share-modal-header .modal-title {
        font-size: 1.25rem;
    }

    .share-modal-body {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .privacy-options {
        gap: 0.75rem;
    }

    .privacy-option-card {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 0.75rem;
    }

    .share-actions {
        grid-template-columns: 1fr;
    }

    .action-text {
        display: none;
    }

    .action-icon {
        font-size: 1.25rem;
    }

    .share-info-box {
        flex-direction: column;
        padding: 1rem;
    }

    .info-list {
        font-size: 0.8rem;
    }
}

/* ============================================
   DARK MODE & THEME SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .share-garage-modal {
        /* Already dark by default */
    }
}

@media (prefers-color-scheme: light) {
    .share-garage-modal {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        color: #0f172a;
    }

    .section-title {
        color: #0f172a;
    }

    .privacy-option-card {
        background: rgba(248, 250, 252, 0.7);
        border-color: rgba(100, 116, 139, 0.3);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* High contrast mode */
@media (prefers-contrast: more) {
    .share-link-container,
    .privacy-options,
    .stats-grid {
        gap: 1.25rem;
    }

    .btn {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .share-garage-modal,
    .share-link-hint,
    .expiration-section,
    .btn,
    .btn-copy,
    .share-action-btn,
    .privacy-option-card {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus visible for keyboard navigation */
.share-garage-modal *:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ============================================
   PUBLIC GARAGE SOCIAL SHARING MODAL
   ============================================ */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.share-modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.share-modal .modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.share-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.share-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.share-modal .modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.share-modal .modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.share-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    display: block;
}

.copy-group {
    display: flex;
    gap: 0.5rem;
}

.share-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f9fafb;
    font-family: monospace;
    color: #1f2937;
}

.share-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.share-modal .social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.twitter {
    color: #1DA1F2;
    border-color: #1DA1F2;
}

.social-btn.twitter:hover {
    background: rgba(29, 161, 242, 0.1);
}

.social-btn.facebook {
    color: #1877F2;
    border-color: #1877F2;
}

.social-btn.facebook:hover {
    background: rgba(24, 119, 242, 0.1);
}

.social-btn.linkedin {
    color: #0A66C2;
    border-color: #0A66C2;
}

.social-btn.linkedin:hover {
    background: rgba(10, 102, 194, 0.1);
}

.qr-code-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    min-height: 220px;
}

.qr-code-img {
    max-width: 200px;
    height: auto;
}

.share-modal .btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-modal .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.share-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.share-modal .btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.share-modal .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.share-modal .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Responsive design */
@media (max-width: 640px) {
    .share-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .share-modal .modal-header {
        padding: 1rem;
    }

    .share-modal .modal-header h2 {
        font-size: 1.25rem;
    }

    .share-modal .modal-body {
        padding: 1rem;
        gap: 1rem;
    }

    .share-modal .social-buttons {
        grid-template-columns: 1fr 1fr;
    }
}
