/* ワークショップ予約システム - フロントエンドCSS */

/* 共通スタイル */
.wb-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.wb-btn-primary {
    background-color: #007cba;
    color: white;
}

.wb-btn-primary:hover {
    background-color: #005a87;
    color: white;
}

.wb-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.wb-btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.wb-btn-danger {
    background-color: #dc3545;
    color: white;
}

.wb-btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.wb-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.wb-btn-disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* バッジ */
.wb-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 12px;
    font-weight: bold;
}

.wb-badge-required {
    background-color: #dc3545;
    color: white;
}

.wb-badge-free {
    background-color: #28a745;
    color: white;
}

.wb-badge-full {
    background-color: #6c757d;
    color: white;
}

/* 会社グリッド */
.wb-companies-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.wb-companies-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.wb-companies-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wb-companies-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.wb-company-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.wb-company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wb-company-thumbnail {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.wb-company-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 48px;
}

.wb-company-content {
    padding: 20px;
}

.wb-company-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.wb-company-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.wb-company-meta {
    margin-bottom: 15px;
}

.wb-company-meta p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.wb-company-meta .dashicons {
    margin-right: 8px;
    color: #007cba;
}

.wb-company-actions {
    text-align: center;
}

/* ワークショップ一覧 */
.wb-company-workshops {
    margin: 20px 0;
}

.wb-company-header {
    margin-bottom: 30px;
    text-align: center;
}

.wb-company-header h2 {
    color: #333;
    margin-bottom: 15px;
}

.wb-company-description {
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.wb-workshops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.wb-workshop-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wb-workshop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wb-workshop-thumbnail {
    height: 150px;
    overflow: hidden;
}

.wb-workshop-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-workshop-content {
    padding: 15px;
}

.wb-workshop-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.wb-workshop-badges {
    margin-bottom: 10px;
}

.wb-workshop-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.wb-workshop-meta {
    margin-bottom: 15px;
}

.wb-workshop-meta p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
}

.wb-workshop-meta .dashicons {
    margin-right: 5px;
    color: #007cba;
}

.wb-workshop-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.wb-workshop-actions .wb-btn {
    flex: 1;
    text-align: center;
}

/* カート */
.wb-cart-icon {
    position: fixed;
    top: 50%;
    right: 20px;
    background-color: #007cba;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.wb-cart-icon:hover {
    background-color: #005a87;
    transform: scale(1.1);
}

.wb-cart-icon .dashicons {
    font-size: 24px;
}

.wb-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.wb-cart-details {
    position: fixed;
    top: 50%;
    right: 100px;
    width: 350px;
    max-height: 500px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow-y: auto;
    transform: translateY(-50%);
}

.wb-cart-details h3 {
    background-color: #f8f9fa;
    margin: 0;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
}

.wb-cart-items {
    padding: 15px;
}

.wb-cart-empty {
    text-align: center;
    color: #666;
    margin: 0;
}

.wb-cart-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wb-cart-item:last-child {
    border-bottom: none;
}

.wb-cart-item-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.wb-cart-item-content p {
    margin: 2px 0;
    font-size: 12px;
    color: #666;
}

.wb-cart-actions {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.wb-cart-actions .wb-btn {
    flex: 1;
}

/* モーダル */
.wb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wb-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.wb-modal-close:hover {
    color: #333;
}

/* フォーム */
.wb-form-group {
    margin-bottom: 20px;
}

.wb-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.wb-form-group input,
.wb-form-group select,
.wb-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wb-form-group input:focus,
.wb-form-group select:focus,
.wb-form-group textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.wb-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.required {
    color: #dc3545;
}

/* ワークショップ詳細 */
.wb-workshop-detail {
    padding: 20px;
    max-width: 600px;
}

.wb-workshop-detail h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.wb-workshop-meta {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wb-workshop-meta p {
    margin: 5px 0;
}

.wb-workshop-content {
    line-height: 1.6;
    margin-bottom: 20px;
}

.wb-available-slots h4 {
    margin-bottom: 15px;
    color: #333;
}

.wb-slots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.wb-slot-item.available {
    border-color: #28a745;
    background-color: #d4edda;
}

.wb-slot-item.full {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.wb-slot-time {
    font-weight: bold;
    color: #333;
}

.wb-slot-capacity {
    color: #666;
    font-size: 14px;
}

/* 予約フォーム */
.wb-booking-form {
    padding: 20px;
    max-width: 400px;
}

.wb-booking-form h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.wb-slot-info,
.wb-capacity-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 予約確認 */
.wb-booking-confirm-content {
    padding: 20px;
    max-width: 500px;
}

.wb-booking-confirm-content h3 {
    margin: 0 0 20px 0;
    color: #333;
}

#wb-booking-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

#wb-booking-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
}

#wb-booking-summary-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wb-summary-item {
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wb-summary-item h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 14px;
}

.wb-summary-item p {
    margin: 2px 0;
    font-size: 13px;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .wb-companies-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-workshops-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-workshop-actions {
        flex-direction: column;
    }
    
    .wb-cart-details {
        width: 90%;
        right: 5%;
        left: 5%;
    }
    
    .wb-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .wb-cart-icon {
        right: 10px;
        width: 50px;
        height: 50px;
    }
    
    .wb-cart-icon .dashicons {
        font-size: 20px;
    }
    
    .wb-cart-count {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    .wb-form-actions {
        flex-direction: column;
    }
    
    .wb-cart-actions {
        flex-direction: column;
    }
    
    .wb-slot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wb-slot-capacity,
    .wb-slot-time {
        width: 100%;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wb-modal {
    animation: fadeIn 0.3s ease;
}

.wb-cart-details {
    animation: fadeIn 0.3s ease;
}

/* ローディング */
.wb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* メッセージ表示 */
.wb-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.wb-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wb-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wb-message.info {
    background-color: #cce7f0;
    color: #055160;
    border: 1px solid #b3d7e6;
}

/* ユーティリティクラス */
.wb-text-center {
    text-align: center;
}

.wb-text-right {
    text-align: right;
}

.wb-hidden {
    display: none !important;
}

.wb-visible {
    display: block !important;
}

.wb-mt-10 {
    margin-top: 10px;
}

.wb-mt-20 {
    margin-top: 20px;
}

.wb-mb-10 {
    margin-bottom: 10px;
}

.wb-mb-20 {
    margin-bottom: 20px;
}