/* スタンプ作成のフィードバック用スタイル */

/* エラーメッセージ */
.stamp-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    -webkit-box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
            box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1);
    -webkit-animation: slideIn 0.3s ease-out;
            animation: slideIn 0.3s ease-out;
}

.stamp-error-message .error-icon {
    font-size: 24px;
    color: #dc3545;
    flex-shrink: 0;
}

.stamp-error-message .error-message {
    flex: 1;
    color: #633;
    font-weight: bold;
}

.stamp-error-message .error-retry,
.stamp-error-message .error-close {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stamp-error-message .error-retry:hover {
    background-color: #dc3545;
    color: white;
}

.stamp-error-message .error-close {
    border: none;
    padding: 8px;
}

.stamp-error-message .error-close:hover {
    background-color: transparent;
    color: #dc3545;
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
}

/* 成功メッセージ */
.stamp-success-message {
    background-color: #efe;
    border: 1px solid #9c9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    -webkit-animation: slideIn 0.3s ease-out;
            animation: slideIn 0.3s ease-out;
}

.stamp-success-message .success-icon {
    font-size: 24px;
    color: #393;
}

.stamp-success-message .success-message {
    flex: 1;
    color: #363;
    font-weight: bold;
}

/* ローディング表示 */
.stamp-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    -webkit-animation: fadeIn 0.3s ease-out;
            animation: fadeIn 0.3s ease-out;
}

.stamp-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #333;
    border-top-color: #fff;
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
            animation: spin 1s linear infinite;
}

.stamp-loading .loading-message {
    color: #fff;
    font-size: 18px;
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
}

.stamp-loading .loading-message .percentage {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #4CAF50;
}

.stamp-loading .loading-progress {
    width: 300px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.stamp-loading .progress-bar {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    -webkit-transition: width 0.3s ease;
    transition: width 0.3s ease;
}

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

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
                transform: rotate(360deg);
    }
}

/* リトライボタン */
.retry-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.retry-button:hover {
    background-color: #45a049;
}

/* バリデーションエラー */
.validation-error {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #856404;
    -webkit-animation: fadeIn 0.3s ease-out;
            animation: fadeIn 0.3s ease-out;
}

.validation-error i {
    color: #f39c12;
    font-size: 16px;
}

/* 無効化されたボタン */
button.disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .stamp-error-message,
    .stamp-success-message {
        flex-direction: column;
        text-align: center;
    }
    
    .stamp-loading .loading-progress {
        width: 80%;
    }
    
    .validation-error {
        font-size: 12px;
    }
}