/**
 * Common Card Styles - Shared across all card components
 * (location-card, house-card, suite-card)
 */

/* Base Card Structure */
.common-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(108, 184, 254, 0.08);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.common-card:hover {
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.3);
}

/* Admin Controls (shared across all cards) */
.common-card .admin-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.common-card .admin-controls button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.common-card .admin-controls .edit-btn:hover {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.common-card .admin-controls .delete-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Card Image Section */
.common-card .location-image,
.common-card .house-image,
.common-card .suite-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.common-card .location-image img,
.common-card .house-image img,
.common-card .suite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder Image (when no image available) */
.common-card .placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
}

/* Gallery Icon Button */
.common-card .gallery-icon-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 5;
}

.common-card .gallery-icon-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* Card Details/Info Section */
.common-card .location-info,
.common-card .house-details,
.common-card .suite-details {
    padding: 0.75rem 1rem 1rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.common-card .location-info h3,
.common-card .house-details h4,
.common-card .suite-details h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.common-card .location-info p,
.common-card .house-details p,
.common-card .suite-details p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Card Actions Section */
.common-card .house-actions,
.common-card .suite-actions {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-top: auto;
    flex-shrink: 0;
}

/* Action Buttons */
.common-card .btn {
    display: inline-flex;
    width: 100%;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.common-card .btn-primary {
    background: #3b82f6;
}

.common-card .btn-primary:hover {
    background: #2563eb;
}

.common-card .btn-success {
    background: #10b981;
}

.common-card .btn-success:hover {
    background: #059669;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .common-card {
        width: 100%;
        min-height: 300px;
        margin-bottom: 0;
    }

    .common-card .location-image,
    .common-card .house-image,
    .common-card .suite-image {
        height: 140px;
    }

    .common-card .location-info,
    .common-card .house-details,
    .common-card .suite-details {
        padding: 0.6rem 0.75rem 0.75rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .common-card .location-info h3,
    .common-card .house-details h4,
    .common-card .suite-details h4 {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        line-height: 1.2;
        font-weight: 600;
    }

    .common-card .location-info p,
    .common-card .house-details p,
    .common-card .suite-details p {
        font-size: 0.75rem;
        margin: 0.15rem 0;
        line-height: 1.3;
        color: #6b7280;
    }

    .common-card .house-details small,
    .common-card .suite-details small {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .common-card .house-actions,
    .common-card .suite-actions {
        padding: 0.5rem;
        margin-top: auto;
    }

    .common-card .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        min-height: 40px;
        border-radius: 8px;
        font-weight: 600;
        letter-spacing: 0.025em;
    }

    .common-card .placeholder-image {
        font-size: 1.75rem;
        padding: 0.5rem;
        font-weight: 600;
    }

    .common-card .gallery-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: 6px;
        left: 6px;
    }

    .common-card .admin-controls {
        top: 6px;
        right: 6px;
        gap: 6px;
    }

    .common-card .admin-controls button {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .common-card .admin-controls .edit-btn:hover {
        background: rgba(59, 130, 246, 1);
        transform: scale(1.05);
    }

    .common-card .admin-controls .delete-btn:hover {
        background: rgba(239, 68, 68, 1);
        transform: scale(1.05);
    }
}

/* Extra Small Screens (phones in portrait) */
@media (max-width: 480px) {
    .common-card {
        min-height: 260px;
    }

    .common-card .location-image,
    .common-card .house-image,
    .common-card .suite-image {
        height: 100px;
    }

    .common-card .location-info,
    .common-card .house-details,
    .common-card .suite-details {
        padding: 0.4rem;
    }

    .common-card .location-info h3,
    .common-card .house-details h4,
    .common-card .suite-details h4 {
        font-size: 0.8rem;
    }

    .common-card .location-info p,
    .common-card .house-details p,
    .common-card .suite-details p {
        font-size: 0.7rem;
    }

    .common-card .house-actions,
    .common-card .suite-actions {
        padding: 0.4rem;
    }

    .common-card .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-height: 36px;
    }

    .common-card .placeholder-image {
        font-size: 1.25rem;
    }
}
