/* Event Registration System - Frontend Styles */

/* フォーム全般 */
.ers-form {
    max-width: 800px;
    margin: 0 auto;
}

.ers-form-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ers-form-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #333;
}

.ers-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ers-form-row .ers-form-group {
    flex: 1;
}

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

.ers-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ers-form-group input[type="text"],
.ers-form-group input[type="email"],
.ers-form-group input[type="tel"],
.ers-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
}

.ers-form-group input[type="text"]:focus,
.ers-form-group input[type="email"]:focus,
.ers-form-group input[type="tel"]:focus,
.ers-form-group select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.ers-form-group .description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.required {
    color: #dc3232;
}

.ers-form-actions {
    text-align: center;
    padding: 20px 0;
}

.button-large {
    padding: 12px 30px;
    font-size: 16px;
}

/* メッセージ */
.ers-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 3px;
}

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

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

.ers-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.ers-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* イベント一覧 */
.ers-event-list {
    display: grid;
    gap: 40px;
}

/* 会場グループ */
.ers-location-group {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ers-location-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 20px 25px;
    background: linear-gradient(to right, #f8f9fa, #fff);
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 22px;
}

.ers-location-title .dashicons {
    color: #0073aa;
    font-size: 28px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.ers-event-count {
    font-size: 16px;
    color: #666;
    font-weight: normal;
    margin-left: auto;
}

.ers-location-events {
    padding: 20px;
    display: grid;
    gap: 20px;
}

.ers-event-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    transition: all 0.3s;
    align-items: center;
}

.ers-event-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #0073aa;
}

.ers-event-item.event-full {
    opacity: 0.7;
}

.ers-event-thumbnail {
    flex-shrink: 0;
    width: 180px;
}

.ers-event-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

.ers-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ers-event-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.ers-event-title a {
    color: #fff;
    text-decoration: none;
}

.ers-event-title a:hover {
    color: #ff0;
}

/* 横一列レイアウト */
.ers-event-info-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ers-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.ers-meta-item .dashicons {
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ers-event-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.ers-event-actions .button {
    padding: 6px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.ers-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.ers-badge.full {
    background: #dc3232;
    color: #fff;
}

.ers-badge.expired {
    background: #999;
    color: #fff;
}

.ers-badge.applied {
    background: #46b450;
    color: #fff;
}

/* 申込セクション */
.ers-application-section {
    background: #fff;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid #0073aa;
    border-radius: 5px;
}

/* メール説明 */
.ers-email-notice {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    border-radius: 3px;
}

.ers-email-notice h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 18px;
}

.ers-email-notice .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ers-email-info p {
    margin-bottom: 15px;
}

.ers-email-item {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.ers-email-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.ers-email-content {
    flex: 1;
}

.ers-email-content h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.ers-email-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.ers-email-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
    color: #856404;
    font-size: 14px;
}

.ers-email-note .dashicons {
    color: #ffc107;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* マイページのユーザーヘッダー */
.ers-user-header {
    margin-bottom: 30px;
}

.ers-user-info-box {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 5px;
    overflow: hidden;
}

.ers-user-info-content {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.ers-user-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ers-user-details .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #0073aa;
}

.ers-username {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ers-user-email {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.ers-logout-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    background: #dc3545;
    color: #fff;
    border: none;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.ers-logout-button:hover {
    background: #c82333;
    color: #fff;
}

.ers-logout-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* イベント詳細情報 */
.ers-event-details {
    margin: 30px 0;
}

.ers-event-info-box {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 5px;
    overflow: hidden;
}

.ers-info-title {
    background: linear-gradient(to right, #0073aa, #005177);
    color: #fff;
    margin: 0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    font-size: 18px;
}

.ers-info-title .dashicons {
    margin-right: 10px;
}

.ers-event-info-table {
    width: 100%;
    border-collapse: collapse;
}

.ers-event-info-table th,
.ers-event-info-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.ers-event-info-table th {
    width: 180px;
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    vertical-align: middle;
}

.ers-event-info-table td {
    font-size: 16px;
    vertical-align: middle;
}

.ers-event-info-table th .dashicons {
    margin-right: 5px;
    color: #0073aa;
    vertical-align: middle;
}

.ers-event-info-table tbody tr:last-child th,
.ers-event-info-table tbody tr:last-child td {
    border-bottom: none;
}

.ers-capacity-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ers-capacity-count {
    font-size: 18px;
}

.ers-capacity-count strong {
    font-size: 24px;
    color: #0073aa;
}

.ers-progress-bar {
    height: 25px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.ers-progress {
    height: 100%;
    background: linear-gradient(to right, #46b450, #00a32a);
    transition: width 0.5s ease;
    position: relative;
}

.ers-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ers-badge.available {
    background: #46b450;
    color: #fff;
}

.ers-badge.urgent {
    background: #f0b849;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ers-login-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #fff3cd;
    border-top: 1px solid #e5e5e5;
    margin: 0;
}

.ers-login-notice .dashicons {
    color: #856404;
    flex-shrink: 0;
}

.ers-login-notice p {
    margin: 0;
    color: #856404;
}

.ers-login-notice a {
    color: #0073aa;
    text-decoration: underline;
    font-weight: 600;
}

.ers-user-info {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 3px;
}

.ers-info-table {
    width: 100%;
    margin: 15px 0;
}

.ers-info-table th,
.ers-info-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ers-info-table th {
    width: 200px;
    font-weight: 600;
    background: #fff;
}

.ers-deadline-notice {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 3px;
    color: #856404;
}

.ers-deadline-notice .dashicons {
    margin-right: 8px;
}

/* マイ申込一覧 */
.ers-my-applications {
    margin: 30px 0;
}

.ers-applications-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ers-applications-table th,
.ers-applications-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.ers-applications-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.ers-applications-table tr:hover {
    background: #f9f9f9;
}

.ers-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.ers-status.confirmed {
    background: #46b450;
    color: #fff;
}

.ers-status.past {
    background: #999;
    color: #fff;
}

/* 登録終了メッセージ */
.ers-registration-closed {
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

/* タブレット向け調整 */
@media (min-width: 769px) and (max-width: 1024px) {
    .ers-event-thumbnail {
        width: 150px;
    }
    
    .ers-event-info-row {
        gap: 15px;
    }
    
    .ers-meta-item {
        font-size: 13px;
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ers-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ers-event-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .ers-event-thumbnail {
        width: 100%;
    }
    
    .ers-event-info-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .ers-meta-item {
        font-size: 13px;
    }
    
    .ers-event-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .ers-event-actions .button {
        flex: 1;
        text-align: center;
    }
    
    .ers-info-table th {
        width: auto;
    }
    
    .ers-applications-table {
        font-size: 14px;
    }
    
    .ers-applications-table th,
    .ers-applications-table td {
        padding: 8px;
    }
    
    /* イベント詳細情報 */
    .ers-event-info-table th,
    .ers-event-info-table td {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .ers-event-info-table th {
        width: 120px;
    }
    
    .ers-capacity-count {
        font-size: 16px;
    }
    
    .ers-capacity-count strong {
        font-size: 20px;
    }
    
    .ers-capacity-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ers-info-title {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .ers-login-notice {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    /* 会場グループ */
    .ers-location-title {
        font-size: 18px;
        padding: 15px 20px;
        gap: 10px;
    }
    
    .ers-location-title .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    
    .ers-event-count {
        font-size: 14px;
    }
    
    .ers-location-events {
        padding: 15px;
    }
    
    /* メール説明 */
    .ers-email-notice {
        padding: 20px 15px;
    }
    
    .ers-email-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .ers-email-number {
        align-self: flex-start;
    }
    
    /* マイページ */
    .ers-user-info-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .ers-user-details {
        justify-content: center;
    }
    
    .ers-user-actions {
        text-align: center;
    }
    
    .ers-logout-button {
        width: 100%;
        justify-content: center;
    }
}
