/* Custom Therapy Matcher Styles */

/* Error and Info Messages */
.ctm-error-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ctm-error-message p {
    margin: 0;
    font-size: 14px;
}

.ctm-info-message {
    background: #e0f2fe;
    border: 1px solid #0284c7;
    border-left: 4px solid #0284c7;
    color: #0c4a6e;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ctm-info-message p {
    margin: 0;
    font-size: 14px;
}

.ctm-info-message a {
    color: #0369a1;
    font-weight: 600;
}

.ctm-success-notification {
    background: #dcfce7;
    border: 1px solid #22c55e;
    border-left: 4px solid #22c55e;
    color: #166534;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ctm-success-notification p {
    margin: 0;
    font-size: 14px;
}

/* Registration Forms */
.ctm-registration-form {
    max-width: 650px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ctm-registration-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.ctm-registration-form .form-group {
    margin-bottom: 20px;
}

.ctm-registration-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.ctm-registration-form input[type="text"],
.ctm-registration-form input[type="email"],
.ctm-registration-form input[type="password"],
.ctm-registration-form input[type="number"],
.ctm-registration-form input[type="file"],
.ctm-registration-form select,
.ctm-registration-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ctm-registration-form input[type="text"]:focus,
.ctm-registration-form input[type="email"]:focus,
.ctm-registration-form input[type="password"]:focus,
.ctm-registration-form input[type="number"]:focus,
.ctm-registration-form select:focus,
.ctm-registration-form textarea:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    outline: none;
}

.ctm-registration-form textarea {
    height: 100px;
    resize: vertical;
}

.ctm-registration-form .checkbox-group {
    padding: 10px 0;
}

.ctm-registration-form .checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 8px;
    cursor: pointer;
}

.ctm-registration-form .checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ctm-button {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 25px;
}

.ctm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

.ctm-button:active {
    transform: translateY(0);
}

/* Portal Tabs */
.ctm-portal-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.ctm-tab-btn {
    padding: 10px 20px;
    border: 2px solid #e91e63;
    background: transparent;
    color: #e91e63;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.ctm-tab-btn.active,
.ctm-tab-btn:hover {
    background: #e91e63;
    color: #fff;
}

.ctm-portal-content {
    display: none;
}

.ctm-portal-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Availability Grid */
.ctm-availability-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.ctm-grid-header,
.ctm-time-label {
    font-weight: bold;
    text-align: center;
    padding: 5px;
    background: #f0f0f0;
    font-size: 12px;
}

.ctm-grid-slot {
    border: 1px solid #ddd;
    height: 30px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}

.ctm-grid-slot:hover {
    background: #e6f7ff;
}

.ctm-grid-slot.selected {
    background: #4CAF50;
    border-color: #4CAF50;
}

.ctm-grid-slot.booked {
    background: #f44336;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .ctm-availability-grid {
        font-size: 10px;
    }

    .ctm-grid-header {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
    }
}

/* Matching Interface */
#ctm-matching-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#ctm-loading {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 40px;
}

.ctm-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .ctm-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .ctm-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ctm-results-grid {
        grid-template-columns: 1fr;
    }
}

.ctm-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: visible;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    position: relative;
    border: 1px solid #eee;
}

.ctm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.ctm-card-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
}

.ctm-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ctm-match-badge {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2ecc71;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ctm-card-body {
    padding: 0;
    width: 100%;
    margin-bottom: 15px;
}

.ctm-card-body h3 {
    margin: 10px 0 5px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
}

.ctm-specialties {
    color: #3498db;
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ctm-compatibility {
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
}

.ctm-rating {
    color: #ffc107;
    font-size: 18px;
    margin-bottom: 10px;
}

.ctm-card-footer {
    margin-top: auto;
    width: 100%;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctm-btn {
    text-decoration: none;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    display: block;
    width: 100%;
    text-align: center;
}

.ctm-btn-primary {
    background: #e67e22;
    color: #fff;
    border: none;
}

.ctm-btn-primary:hover {
    background: #d35400;
}

.ctm-btn-secondary {
    background: #007bff;
    color: #fff;
    border: none;
}

.ctm-btn-secondary:hover {
    background: #0056b3;
}

/* Profile Page Styles */
.ctm-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

.ctm-profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.ctm-profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ctm-profile-info h1 {
    margin-top: 0;
    color: #2c3e50;
}

.ctm-profile-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Profile Content Grid */
.ctm-profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Booking Section */
.ctm-booking-form-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.ctm-slot-btn {
    border: 1px solid #ddd;
    background: #f8f9fa;
    padding: 8px 15px;
    margin: 5px !important;
    /* Override standard button margin if needed */
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.ctm-slot-btn.active {
    background: #e91e63 !important;
    color: #fff;
    border-color: #e91e63;
}

/* Products Grid */
.ctm-profile-products {
    grid-column: 1 / -1;
    /* Full width */
    margin-top: 40px;
}

.ctm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ctm-product-card {
    text-align: center;
    transition: transform 0.2s;
}

.ctm-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ctm-product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Contact Form */
.ctm-profile-contact {
    grid-column: 2;
    grid-row: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .ctm-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ctm-profile-content {
        grid-template-columns: 1fr;
    }

    .ctm-profile-contact {
        grid-column: 1;
    }
}