/* Profile Modal Styles - Custom Classes */

/* Modal Backdrop */

.profile-modal-container {
    width: 640px;
}

.profile-modal-container .fixed.inset-0 {
    background: rgba(44, 44, 44, 0.55);
}

/* Essential Modal Container Classes */
.profile-modal-container .fixed {
    position: fixed;
}

.profile-modal-container .inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.profile-modal-container .z-50 {
    z-index: 9999;
}

.profile-modal-container .z-10 {
    z-index: 10;
}

.profile-modal-container .relative {
    position: relative;
}

.profile-modal-container .absolute {
    position: absolute;
}

.profile-modal-container .overflow-y-auto {
    overflow-y: auto;
}

.profile-modal-container .overflow-hidden {
    overflow: hidden;
}

.profile-modal-container .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.profile-modal-container .py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.profile-modal-container .mb-6 {
    margin-bottom: 1.5rem;
}

.profile-modal-container .bg-white {
    background-color: #ffffff;
}

.profile-modal-container .rounded-lg {
    border-radius: 0.5rem;
}

.profile-modal-container .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.profile-modal-container .transform {
    transform: translateZ(0);
}

.profile-modal-container .transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.profile-modal-container .w-full {
    width: 100%;
}

.profile-modal-container .opacity-75 {
    opacity: 0.75;
}

/* Responsive classes */
@media (min-width: 640px) {
    .profile-modal-container .sm\:px-0 {
        padding-left: 0;
        padding-right: 0;
    }
    
    .profile-modal-container .sm\:w-full {
        width: 100%;
    }
    
    .profile-modal-container .sm\:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
    
    .profile-modal-container .sm\:max-w-4xl {
        max-width: 640px;
    }
    
    .profile-modal-container .sm\:translate-y-0 {
        transform: translateY(0);
    }
    
    .profile-modal-container .sm\:scale-95 {
        transform: scale(0.95);
    }
    
    .profile-modal-container .sm\:scale-100 {
        transform: scale(1);
    }
}

/* Translate utilities for animations */
.profile-modal-container .translate-y-4 {
    transform: translateY(1rem);
}

.profile-modal-container .translate-y-0 {
    transform: translateY(0);
}

/* Scale utilities */
.profile-modal-container .scale-95 {
    transform: scale(0.95);
}

.profile-modal-container .scale-100 {
    transform: scale(1);
}

/* Opacity utilities */
.profile-modal-container .opacity-0 {
    opacity: 0;
}

.profile-modal-container .opacity-100 {
    opacity: 1;
}

/* Dark mode support (if needed) */
.profile-modal-container .dark\:bg-gray-800 {
    background-color: #1f2937;
}

.profile-modal-container .dark\:bg-gray-900 {
    background-color: #111827;
}

.profile-modal-container .dark\:text-gray-200 {
    color: #e5e7eb;
}

.profile-modal-container .dark\:text-gray-300 {
    color: #d1d5db;
}

.profile-modal-container .dark\:text-gray-400 {
    color: #9ca3af;
}

.profile-modal-container .dark\:text-gray-100 {
    color: #f3f4f6;
}

.profile-modal-container .dark\:border-gray-700 {
    border-color: #374151;
}

/* Modal visibility - default hidden, but allow Alpine's inline styles to override */
.profile-modal-container > div[x-data] {
    display: none;
}

/* Show when Alpine sets display: block via inline style (Alpine adds this when x-show is true) */
.profile-modal-container > div[x-data][style*="display: block"],
.profile-modal-container > div[x-data][style*="display:block"] {
    display: block !important;
}

/* Ensure x-cloak hides the modal until Alpine is ready */
.profile-modal-container [x-cloak] {
    display: none !important;
}

/* Remove x-cloak when Alpine is ready and modal should be shown */
.profile-modal-container [x-cloak][style*="display: block"],
.profile-modal-container [x-cloak][style*="display:block"] {
    display: block !important;
}

/* Ensure backdrop and content are only visible when parent modal is shown */
.profile-modal-container > div[x-data][style*="display: block"] .fixed.inset-0[x-show] {
    display: block !important;
}

.profile-modal-container > div[x-data][style*="display: block"] .mb-6.bg-white[x-show] {
    display: block !important;
}

/* Hide backdrop and content when modal is hidden */
.profile-modal-container > div[x-data]:not([style*="display: block"]) .fixed.inset-0,
.profile-modal-container > div[x-data]:not([style*="display: block"]) .mb-6.bg-white {
    display: none !important;
}

/* Alpine.js x-cloak support */
[x-cloak] {
    display: none !important;
}

/* Modal Header */
.profile-modal-header {
    padding: 16px 32px;
    border-bottom: 1px solid #E3E7EA;
}

.profile-modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

/* Modal Tabs Container */
.profile-modal-tabs-container {
    padding: 0px 20px 0px 20px;
    border-bottom: 2px solid #E3E7EA;
}

.profile-modal-tabs {
    display: flex;
}

.profile-modal-tab-badge {
    font-size: 11px;
    font-weight: 400;
    color: #7B8995;
    margin-top: -2px;
}

.no-padding {
    padding: 0px !important;
}

.profile-modal-tab {
    position: relative;
    height: 44px;
    padding: 0px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #29705D;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.profile-modal-tab:hover {
    color: #374151;
}

.profile-modal-tab-active {
    background-color: #EEFBF5;
    border-bottom-color: #49BE94;
}

/* Modal Content Area */
.profile-modal-content {
    padding: 32px 120px;
    position: relative;
    overflow: visible;
}

.profile-modal-section {
    margin-bottom: 24px;
}

.profile-modal-section:last-child {
    margin-bottom: 0;
}

/* Form Fields */
.profile-modal-field {
    margin-bottom: 12px;
}

.profile-modal-field:last-child {
    margin-bottom: 0;
}

.profile-modal-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 4px;
}

.profile-modal-label-optional {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.5rem;
}

.profile-modal-label-optional::after {
    content: " (Optional)";
    color: #87919C;
    font-weight: 400;
}

.profile-modal-input {
    width: 100%;
    padding: 8px 12px !important;
    border: 1px solid #CBD1D6 !important;
    border-radius: 10px;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #000000;
    background-color: #ffffff !important;
    transition: all 0.2s ease;
}

.profile-modal-input::placeholder {
    color: #9ca3af;
}

.profile-modal-textarea {
    width: 100%;
    padding: 8px 12px !important;
    border: 1px solid #CBD1D6;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #000000;
    background-color: #ffffff;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
}

.profile-modal-textarea::placeholder {
    color: #9ca3af;
}

.profile-modal-info-text {
    font-size: 13px;
    color: #525C68;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Profile Image Section */
.profile-modal-image-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-modal-image-wrapper {
    position: relative;
}

.profile-modal-image-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #CBD1D6;
}

.profile-modal-image-actions {
    display: flex;
    gap: 10px;
}

/* Tags/Chips */
.profile-modal-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-modal-tag-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.profile-modal-tag-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.profile-modal-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background-color: #e5e7eb;
    color: #374151;
}

.profile-modal-tag:hover {
    background-color: #d1d5db;
}

.profile-modal-tag-active {
    background-color: #d1fae5;
    color: #065f46;
}

.profile-modal-tag-active:hover {
    background-color: #a7f3d0;
}

/* Buttons */
.profile-modal-button {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 80px;
}

.profile-modal-button-secondary {
    background-color: #FFFFFF;
    color: #000000;
    border: 1px solid #CBD1D6;
    border-radius: 10px;
}

.profile-modal-button-secondary:hover {
    background-color: #CBD1D6;
    border-color: #CBD1D6;
}

.profile-modal-button-primary {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
    color: #ffffff;
    border-radius: 10px;
}

.profile-modal-button-primary:hover {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
}

.profile-modal-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer */
.profile-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 32px;
    border-top: 1px solid #E3E7EA;
}

.profile-modal-footer-left {
    margin-right: auto;
}

.profile-modal-footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* Grid Layout */
.profile-modal-grid {
    display: grid;
    gap: 1rem;
}

.profile-modal-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Checkboxes */
.profile-modal-checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.profile-modal-checkbox-wrapper:last-child {
    margin-bottom: 0;
}

.profile-modal-checkbox {
    width: auto;
    margin-right: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    color: #49BE94;
    cursor: pointer;
}

.profile-modal-checkbox:checked {
    accent-color: #29705D;
    border-color: #29705D;
}

.profile-modal-checkbox-label {
    font-size: 14px;
    color: #000000;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

checkbox:checked {
    accent-color: #29705D;
    border-color: #29705D;
}

.profile-modal-checkbox-label-agreement {
    font-size: 14px;
    color: #29705D;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

/* File Upload Area */
.profile-modal-file-upload {
    border: 2px solid #CBD1D6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background-color: #F4F6F7;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-modal-file-upload.dragover {
    border-color: #CBD1D6;
    background-color: #f0fdf4;
}

.profile-modal-file-icon {
    margin: 0 auto 10px;
    width: 32px;
    height: 32px;
}

.profile-modal-file-text {
    font-size: 14px;
    color: #000000;
    margin-bottom: 4px;
}

.profile-modal-file-browse-link {
    background: none;
    border: none;
    color: #3A6755;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

.profile-modal-file-formats {
    font-size: 13px;
    color: #5F6D7B;
}

.profile-modal-file-list {
    margin-top: 8px;
    text-align: left;
}

.profile-modal-file-item {
    font-size: 14px;
    color: #000000;
    margin-bottom: 4px;
}

/* Section Headings */
.profile-modal-section-heading {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 400;
    color: #5F6D7B;
    margin-bottom: 8px;
}

.profile-modal-section-heading-line {
    width: 100%;
    margin-left: 8px;
}

.profile-modal-section-heading-line::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background-color: #E3E7EA;
    margin-top: 10px;
}

.profile-modal-section-description {
    font-size: 13px;
    color: #5F6D7B;
    margin-bottom: 8px;
    line-height: 1.5;
}
/* Utility Classes */
.profile-modal-hidden {
    display: none;
}

.profile-modal-text-center {
    text-align: center;
}

.profile-modal-text-left {
    text-align: left;
}

/* Ensure modal is above everything */
body.overflow-y-hidden {
    overflow: hidden !important;
}

/* Responsive styles */
@media (max-width: 640px) {
    .profile-modal-header {
        padding: 16px 20px;
    }
    
    .profile-modal-tabs-container {
        padding: 16px 20px 0;
    }
    
    .profile-modal-content {
        padding: 20px;
    }
    
    .profile-modal-footer {
        padding: 20px;
    }
    
    .profile-modal-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .profile-modal-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .profile-modal-tab {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

/* Animation for modal appearance */
@keyframes profileModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-modal-container .mb-6.bg-white {
    animation: profileModalFadeIn 0.2s ease-out;
}

/* Scrollbar styling for modal content */
.profile-modal-container .overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.profile-modal-container .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.profile-modal-container .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.profile-modal-container .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   Profile Preview Modal Styles
   ============================================ */

.profile-preview-container {
    padding: 0;
}

.profile-preview-header {
    padding: 16px 32px;
    border-bottom: 1px solid #E3E7EA;
}

.profile-preview-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

/* Profile Preview Card */
.profile-preview-card {
    border: 1px solid #E3E7EA;
    border-radius: 12px;
    margin: 32px;
    padding: 32px;
}

/* Profile Header Section */
.profile-preview-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
}

.profile-preview-image-name {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-preview-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #CBD1D6;
}

.profile-preview-name-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-preview-name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.profile-preview-role {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #29705D;
    font-size: 14px;
    font-weight: 500;
}

.profile-preview-role svg {
    width: 16px;
    height: 16px;
}

.profile-preview-message-btn {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-preview-message-btn:hover {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
}

/* Profile Details Section */
.profile-preview-details {
    display: flex;
    flex-direction: column;
}

.profile-preview-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-preview-detail-title {
    font-size: 14px;
    font-weight: 500;
    color: #2C6672;
    margin: 0;
    margin-bottom: 6px;
}

.profile-preview-detail-content {
    font-size: 14px;
    color: #000000;
    line-height: 1.5;
    margin: 0;
}

/* Tags */
.profile-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.profile-preview-tag {
    background: #DFFFD6;
    color: #006E2E;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    border: none;
}

/* Social Links */
.profile-preview-social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.profile-preview-social-link {
    width: 24px;
    height: 24px;
    display: flex;
    text-decoration: none;
}

.profile-preview-social-link:hover {
    transform: scale(1.1);
}

.profile-preview-social-link i {
    font-size: 18px;
    color: white;
}

/* Footer */
.profile-preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px;
    border-top: 1px solid #E3E7EA;
    gap: 0.75rem;
}

.profile-preview-footer-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #CBD1D6;
    background: #FFFFFF;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.profile-preview-footer-btn:hover {
    background-color: #CBD1D6;
    border-color: #CBD1D6;
}

.profile-preview-edit-btn {
    border-color: #D1D5DB;
}

.profile-preview-edit-btn i {
    font-size: 14px;
}

.profile-preview-cancel-btn {
    margin-left: auto;
}

/* Custom Multi-select Component */
.profile-modal-multiselect-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
}

.profile-modal-multiselect-wrapper:has(.profile-modal-multiselect-dropdown.show) {
    z-index: 10001;
}

/* Allow dropdown to overflow modal container when open */
.profile-modal-container .mb-6.bg-white {
    overflow: visible;
}

/* Ensure modal content allows overflow for dropdowns */
.profile-modal-content {
    overflow: visible !important;
}

.profile-modal-multiselect-input {
    min-height: 38px;
    width: 100%;
    padding: 2px;
    border: 1px solid #CBD1D6;
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-modal-multiselect-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
    align-items: center;
}

.profile-modal-multiselect-placeholder {
    color: #9CA3AF;
    font-size: 12px;
    padding: 8px 0px 8px 8px;
}

.profile-modal-multiselect-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #D6F5E5;
    color: #208A6A;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.profile-modal-multiselect-tag-remove {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #208A6A;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s;
}

.profile-modal-multiselect-tag-remove:hover {
    color: #1a4d3f;
}

.profile-modal-multiselect-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s;
}

.profile-modal-multiselect-input.active .profile-modal-multiselect-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.profile-modal-multiselect-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 4px;
    background-color: #ffffff;
    border: 1px solid #CBD1D6;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10001;
    display: none;
}

.profile-modal-multiselect-dropdown.show {
    display: block;
}

.profile-modal-multiselect-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-modal-multiselect-option:hover {
    background-color: #F9FAFB;
}

.profile-modal-multiselect-option input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: #fff;
    accent-color: #29705D;
}

.profile-modal-multiselect-option span {
    font-size: 14px;
    color: #1f2937;
}

.profile-preview-save-btn {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
    color: white;
    border: none;
    border-radius: 10px;
    justify-content: center;
}

.profile-preview-save-btn:hover {
    background: linear-gradient(90deg, #26A37B 0%, #307F8D 100%);
}

/* Represents Table Styles */
.profile-modal-represents-section {
    width: 100%;
}

.profile-modal-represents-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.profile-modal-represents-table thead {
    background-color: #F9FAFB;
    border-bottom: 1px solid #E3E7EA;
}

.profile-modal-represents-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #1F2937;
    border-bottom: 1px solid #E3E7EA;
}

.profile-modal-represents-table td {
    padding: 16px;
    border-bottom: 1px solid #E3E7EA;
    font-size: 14px;
    color: #374151;
}

.profile-modal-represents-table tbody tr:hover {
    background-color: #F9FAFB;
}

.profile-modal-represents-artist {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-modal-represents-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E3E7EA;
}

.profile-modal-represents-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-modal-represents-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #F3F4F6;
    color: #374151;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.profile-modal-represents-empty {
    color: #9CA3AF;
    font-style: italic;
}

.profile-modal-represents-empty-row {
    text-align: center;
    padding: 32px;
    color: #9CA3AF;
}
