/* Clinic Claim Manager Frontend Styles */

/* Claim Button and Badge */
.ccm-claim-button,
.ccm-claimed-badge {
    display: inline-block;
    padding: 10px 0;
    font-family: "Urbanist", sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.ccm-claim-button {
    background-color: unset;
    font-family: "Sora", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.85rem;
    color: #6b7280;
    border: none;
    cursor: pointer;
}

.ccm-claim-button:hover {
    background-color: unset;
    color: #16697A;
    text-decoration: underline;
    transform: unset;
    box-shadow: unset;
}

.ccm-claimed-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: unset;
    font-weight: 400;
    font-style: normal;
    font-size: 0.85rem;
    color: #16697A;
    cursor: default;
    pointer-events: none;
}

.ccm-claimed-badge::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2316697A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Forms */
.ccm-form {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ccm-form-group {
    margin-bottom: 20px;
}

.ccm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
}

.ccm-form-group input[type="text"],
.ccm-form-group input[type="email"],
.ccm-form-group input[type="tel"],
.ccm-form-group input[type="password"],
.ccm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: "Sora", sans-serif;
    transition: border-color 0.3s;
}

.ccm-form-group input:focus,
.ccm-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ccm-form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

/* Checkbox Groups */
.ccm-checkbox-group {
    display: grid;
    flex-direction: row;
    gap: 10px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.ccm-checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 400 !important;
    margin: 0 !important;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    font-size: 16px !important;
    background: #fff;
}

.ccm-checkbox-label:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ccm-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ccm-checkbox-label.selected {
    background: #f9fafb;
    border-color: #16697A;
}

.ccm-checkbox-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #16697A;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
    pointer-events: none;
}

.ccm-checkbox-label.selected .ccm-checkbox-badge {
    opacity: 1;
    transform: scale(1);
}

.ccm-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    font-family: "Urbanist", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccm-submit-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ccm-submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Messages */
.ccm-form-notice {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
}

.ccm-form-notice.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}

.ccm-form-notice.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}

.ccm-form-notice.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
    display: block;
}

.ccm-form-info {
    padding: 12px 16px;
    background-color: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ccm-form-info p {
    margin: 0;
    color: #1e40af;
}

/* Verify Success */
.ccm-verify-success {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.ccm-verify-success h2 {
    color: #10b981;
    margin-bottom: 20px;
}

.ccm-verify-success p {
    margin-bottom: 30px;
    color: #4b5563;
}

.ccm-button {
    display: inline-block;
    padding: 14px 28px;
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-family: "Urbanist", sans-serif;
    transition: all 0.3s ease;
}

.ccm-button:hover {
    background-color: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Manage Clinics */
.ccm-manage-clinics-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ccm-clinic-item {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ccm-clinic-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1f2937;
}

.ccm-clinic-item p {
    margin: 0;
}

.ccm-clinic-item a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.ccm-clinic-item a:hover {
    text-decoration: underline;
}

/* Loading State */
.ccm-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ccm-form.loading .ccm-submit-btn::after {
    content: "...";
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: "";
    }
    40% {
        content: ".";
    }
    60% {
        content: "..";
    }
    80%, 100% {
        content: "...";
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ccm-form,
    .ccm-verify-success,
    .ccm-manage-clinics-wrapper {
        padding: 15px;
    }
    
    .ccm-claim-button,
    .ccm-claimed-badge {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Clinic Search */
.ccm-clinic-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ccm-clinic-search-wrapper h2 {
    margin-bottom: 10px;
    color: #1f2937;
    font-family: "Urbanist", sans-serif;
}

.ccm-clinic-search-wrapper > p {
    margin-bottom: 30px;
    color: #6b7280;
}

.ccm-search-box {
    position: relative;
}

.ccm-search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-family: "Sora", sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ccm-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ccm-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.ccm-search-loading,
.ccm-no-results,
.ccm-search-error {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.ccm-search-error {
    color: #ef4444;
}

.ccm-clinic-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ccm-clinic-list .ccm-clinic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #f3f4f6;
    box-shadow: none;
    transition: background-color 0.2s;
}

.ccm-clinic-list .ccm-clinic-item:last-child {
    border-bottom: none;
}

.ccm-clinic-list .ccm-clinic-item:hover {
    background-color: #f9fafb;
}

.ccm-clinic-info {
    flex: 1;
}

.ccm-clinic-info h4 {
    margin: 0 0 5px 0;
    color: #1f2937;
    font-size: 16px;
    font-family: "Urbanist", sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ccm-clinic-city {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.ccm-clinic-actions {
    flex-shrink: 0;
    margin-left: 15px;
}

.ccm-claim-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: #2563eb;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Urbanist", sans-serif;
    transition: all 0.3s ease;
}

.ccm-claim-link:hover {
    background-color: #1d4ed8;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ccm-claimed-badge {
    font-size: 12px;
    padding: 4px 12px;
    margin: 0;
}

@media (max-width: 768px) {
    .ccm-clinic-list .ccm-clinic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ccm-clinic-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .ccm-claim-link {
        display: block;
        text-align: center;
    }
}

/* Custom Login Form */
.ccm-login-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ccm-login-wrapper h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: #1f2937;
    font-family: "Urbanist", sans-serif;
    font-size: 24px;
}

#ccm-loginform .ccm-form-group {
    margin-bottom: 20px;
}

#ccm-loginform input[type="text"],
#ccm-loginform input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: "Sora", sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#ccm-loginform input[type="text"]:focus,
#ccm-loginform input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#ccm-loginform input[type="checkbox"] {
    width: auto;
    margin: 0;
}

#ccm-loginform .ccm-submit-btn {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .ccm-login-wrapper {
        margin: 20px auto;
        padding: 30px 20px;
    }
    
    .ccm-login-wrapper h2 {
        font-size: 20px;
    }
}

/* Premium Button and Badge */
.ccm-premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: "Urbanist", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ccm-premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.ccm-premium-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ccm-premium-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ccm-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Urbanist", sans-serif;
}

.ccm-premium-badge svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .ccm-premium-btn {
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .ccm-premium-badge {
        font-size: 13px;
        padding: 6px 14px;
    }
}

@media (max-width: 830px) {
    .ccm-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .ccm-checkbox-label {
        justify-content: flex-start;
    }
}

/* Upload Progress Overlay */
.ccm-gallery-item {
    position: relative;
}

.ccm-upload-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
}

.ccm-upload-progress-bar {
    width: 80%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.ccm-upload-progress-fill {
    height: 100%;
    background: #16697A;
    transition: width 0.2s ease;
}

.ccm-upload-progress-text {
    font-size: 12px;
    color: #16697A;
    font-weight: 600;
}
