/**
 * Invitation System CSS
 * 
 * Styles for invitation modal and preview
 * 
 * @package Nammashale
 */

/* ===== INVITE MODAL ===== */

.invite-friends-btn {
    margin: 20px 0;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.invite-friends-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.invite-friends-btn .icon {
    font-size: 20px;
}

/* Modal Styles */
.invitation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.invitation-modal.active {
    display: flex;
}

.invitation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.invitation-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    margin: auto;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    text-align: center;
    color: #666;
}

/* Input Section */
.invite-input-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 12px;
}

.invite-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.invite-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-email-invite-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-email-invite-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-email-invite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: #999;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider::before {
    margin-right: 10px;
}

.divider::after {
    margin-left: 10px;
}

/* Social Share Section */
.social-share-section {
    margin-bottom: 30px;
}

.social-share-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.modal-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 12px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.modal-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
    background: #f0f4ff;
}

.modal-share-btn .icon {
    font-size: 28px;
}

.modal-share-btn .name {
    display: block;
    text-align: center;
}

/* Platform specific colors */
.facebook-share:hover {
    border-color: #1877f2;
    background: #e7f3ff;
    color: #1877f2;
}

.whatsapp-share:hover {
    border-color: #25d366;
    background: #e8f8f0;
    color: #25d366;
}

.telegram-share:hover {
    border-color: #0088cc;
    background: #e0f2ff;
    color: #0088cc;
}

.sharechat-share:hover {
    border-color: #ff5722;
    background: #ffe8e0;
    color: #ff5722;
}

.sms-share:hover {
    border-color: #34c759;
    background: #e8f8f0;
    color: #34c759;
}

.email-share:hover {
    border-color: #ff9500;
    background: #fff8e8;
    color: #ff9500;
}

/* Copy Link Section */
.copy-link-section {
    margin-bottom: 30px;
}

.copy-link-section p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
}

.copy-link-container {
    display: flex;
    gap: 10px;
}

.invite-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8f9fa;
    word-break: break-all;
}

.copy-invite-link-btn {
    padding: 10px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-invite-link-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* QR Code Section */
.qr-code-section {
    text-align: center;
}

.qr-code-section p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
}

.qr-code-container img {
    max-width: 200px;
    height: auto;
}

/* Modal is open - prevent body scroll */
body.modal-open {
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
    .invitation-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .share-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-share-btn {
        padding: 12px 8px;
    }

    .modal-share-btn .icon {
        font-size: 24px;
    }

    .copy-link-container {
        flex-direction: column;
    }

    .copy-invite-link-btn {
        width: 100%;
    }
}

/* ===== INVITATION PREVIEW PAGE ===== */

.invitation-preview-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.invitation-preview-wrapper {
    width: 100%;
}

.invitation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.invitation-image-section {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5704f 0%, #f5704f 100%);
}

.invitation-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invitation-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5704f 0%, #f5704f 100%);
}

.placeholder-avatar {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: bold;
    color: white;
}

.invitation-info-section {
    padding: 40px;
}

.invitation-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.sender-profile-preview {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    gap: 20px;
}

.sender-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #667eea;
    flex-shrink: 0;
}

.sender-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.sender-details h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #333;
}

.sender-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.occupation::before,
.location::before {
    display: inline;
}

.invitation-share-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.invitation-share-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.share-btn .icon {
    font-size: 16px;
}

.facebook-share:hover {
    border-color: #1877f2;
    background: #1877f2;
}

.whatsapp-share:hover {
    border-color: #25d366;
    background: #25d366;
}

.telegram-share:hover {
    border-color: #0088cc;
    background: #0088cc;
}

.sharechat-share:hover {
    border-color: #ff5722;
    background: #ff5722;
}

.sms-share:hover {
    border-color: #34c759;
    background: #34c759;
}

.email-share:hover {
    border-color: #ff9500;
    background: #ff9500;
}

.copy-link-btn:hover {
    border-color: #667eea;
    background: #667eea;
}

.invitation-actions {
    display: flex;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-unfriend {
    background: #f5704f;
    color: white;
    border: none;
}

.btn-unfriend:hover {
    background: #e85a3a;
}

.already-friends-message,
.pending-message {
    text-align: center;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    color: #2e7d32;
}

.invitation-details {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

.nammashale-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
}

.nammashale-info strong {
    color: #f5704f;
    font-size: 18px;
}

.invitation-error {
    text-align: center;
    padding: 40px 20px;
    background: #ffebee;
    border-radius: 8px;
    color: #c62828;
}

@media (max-width: 600px) {
    .invitation-preview-container {
        padding: 10px;
    }

    .invitation-info-section {
        padding: 20px;
    }

    .invitation-title {
        font-size: 22px;
    }

    .sender-profile-preview {
        flex-direction: column;
        text-align: center;
    }

    .sender-avatar {
        width: 60px;
        height: 60px;
    }

    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .invitation-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
