/**
 * Sprint Invitations Modal Styles
 * Modern B2B design with responsive layout
 */

/* ========================================
   MODAL OVERLAY & CONTAINER
   ======================================== */

.invite-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.invite-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   MODAL HEADER
   ======================================== */

.invite-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.invite-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.invite-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ========================================
   MODAL BODY
   ======================================== */

.invite-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* ========================================
   CREATE INVITE SECTION
   ======================================== */

.invite-create-section {
    background: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px solid #e5e7eb;
}

.invite-create-section h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.invite-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.invite-setting {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-setting label {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.invite-setting select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
}

.invite-setting select:hover {
    border-color: #667eea;
}

.invite-setting select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
    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.2s;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-secondary.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-danger.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-copy {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #059669;
}

/* ========================================
   CREATED INVITE RESULT
   ======================================== */

.invite-created-result {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #6ee7b7;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.invite-created-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #065f46;
    font-size: 16px;
}

.invite-success-icon {
    font-size: 24px;
}

.invite-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.invite-url-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: white;
    color: #065f46;
}

.invite-url-container input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.invite-share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========================================
   INVITES LIST SECTION
   ======================================== */

.invite-list-section {
    margin-top: 32px;
}

.invite-list-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.invites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invites-loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.invites-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
}

/* ========================================
   INVITE ITEM
   ======================================== */

.invite-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
}

.invite-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.invite-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.invite-token {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    background: #ede9fe;
    padding: 6px 12px;
    border-radius: 6px;
}

.invite-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
}

.invite-item-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.invite-item-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1f2937;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .invite-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .invite-modal-header {
        padding: 20px;
    }

    .invite-modal-header h3 {
        font-size: 18px;
    }

    .invite-modal-body {
        padding: 20px;
    }

    .invite-create-section {
        padding: 16px;
    }

    .invite-settings {
        grid-template-columns: 1fr;
    }

    .invite-url-container {
        flex-direction: column;
    }

    .invite-url-container input {
        font-size: 12px;
    }

    .invite-item-info {
        grid-template-columns: 1fr;
    }

    .invite-item-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-danger {
        width: 100%;
    }

    .toast {
        right: 15px;
        left: 15px;
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    .invite-modal-header h3 {
        font-size: 16px;
    }

    .invite-modal-close {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }

    .invite-share-buttons {
        flex-direction: column;
    }

    .btn-secondary.btn-sm {
        width: 100%;
    }
}

/* ========================================
   DARK MODE SUPPORT (Future)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .invite-modal {
        background: #1f2937;
    }

    .invite-create-section {
        background: #374151;
        border-color: #4b5563;
    }

    .invite-create-section h4,
    .invite-list-section h4 {
        color: #f9fafb;
    }

    .invite-setting label {
        color: #d1d5db;
    }

    .invite-setting select {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .invite-item {
        background: #374151;
        border-color: #4b5563;
    }

    .invite-item-info {
        color: #d1d5db;
    }

    .invite-url-container input {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .invites-empty,
    .invites-loading {
        background: #374151;
        color: #9ca3af;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .invite-modal-overlay {
        display: none;
    }
}
